Douglas Gregor [Tue, 19 Feb 2013 18:26:07 +0000 (18:26 +0000)]
Remove my bogus MapVector::erase() with a narrower ::pop_back(), and add a unit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175538
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 19 Feb 2013 18:18:36 +0000 (18:18 +0000)]
Hexagon: Sync TSFlags in MCTargetDesc/HexagonBaseInfo.h with
HexagonInstrFormats.td.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175537
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 19 Feb 2013 17:32:57 +0000 (17:32 +0000)]
Clean up HiPE prologue emission a bit and avoid signed arithmetic tricks.
No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175536
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 19 Feb 2013 17:14:33 +0000 (17:14 +0000)]
Move LLVM_LIBRARY_VISIBILITY for consistency with what was done to
PPCJITInfo.cpp in r175394.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175531
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 19 Feb 2013 17:11:48 +0000 (17:11 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175530
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 19 Feb 2013 16:51:44 +0000 (16:51 +0000)]
Fix GCMetadaPrinter::finishAssembly not executed, patch by Yiannis Tsiouris.
Due to the execution order of doFinalization functions, the GC information were
deleted before AsmPrinter::doFinalization was executed. Thus, the
GCMetadataPrinter::finishAssembly was never called.
The patch fixes that by moving the code of the GCInfoDeleter::doFinalization to
Printer::doFinalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175528
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 19 Feb 2013 16:47:59 +0000 (16:47 +0000)]
Make ARMAsmPrinter pass name more precise and fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175527
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 19 Feb 2013 16:38:32 +0000 (16:38 +0000)]
Make pass name more precise and fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175525
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 19 Feb 2013 15:27:05 +0000 (15:27 +0000)]
ARM NEON: Merge a f32 bitcast of a v2i32 extractelt
A vectorized sitfp on doubles will get scalarized to a sequence of an
extract_element of <2 x i32>, a bitcast to f32 and a sitofp.
Due to the the extract_element, and the bitcast we will uneccessarily generate
moves between scalar and vector registers.
The patch fixes this by using a COPY_TO_REGCLASS and a EXTRACT_SUBREG to extract
the element from the vector instead.
radar://
13191881
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175520
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 19 Feb 2013 15:22:47 +0000 (15:22 +0000)]
R600: Add AR_X to the R600_TReg_X register class.
NOTE: This is a candidate for the Mesa stable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175519
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 19 Feb 2013 15:22:45 +0000 (15:22 +0000)]
R600: Mark all members of the TRegMem register class as reserved
This stops the Machine Verifier from complaining about uses of undefined
physical registers.
NOTE: This is a candidate for the Mesa stable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175518
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 19 Feb 2013 15:22:44 +0000 (15:22 +0000)]
R600: Fix scheduler crash caused by invalid MachinePointerInfo
Kernel function arguments are lowered to loads from the PARAM_I address
space. When creating these load instructions, we were initializing
their MachinePointerInfo with an Arguement object that was not attached
to any function. This was causing the MachineScheduler to crash when
it tried to access the parent of the Arguement.
This has been fixed by initializing the MachinePointerInfo with a
UndefValue instead.
NOTE: This is a candidate for the Mesa stable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175517
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 19 Feb 2013 15:22:42 +0000 (15:22 +0000)]
R600: Fix tracking of implicit defs in the IndirectAddressing pass
In some cases, we were losing track of live implicit registers which
was creating dead defs and causing the scheduler to produce invalid
code.
NOTE: This is a candidate for the Mesa stable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175516
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 19 Feb 2013 11:35:39 +0000 (11:35 +0000)]
Fix initialization-order bug in llvm::Support::TimeValue. TimeValue::now() is explicitly called during module initialization of lib/Support/Process.cpp. It reads the field of global object PosixZeroTime, which is not guaranteed to be initialized at this point. Found by AddressSanitizer with -fsanitize=init-order option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175509
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 19 Feb 2013 11:29:21 +0000 (11:29 +0000)]
[asan] instrument memory accesses with unusual sizes
This patch makes asan instrument memory accesses with unusual sizes (e.g. 5 bytes or 10 bytes), e.g. long double or
packed structures.
Instrumentation is done with two 1-byte checks
(first and last bytes) and if the error is found
__asan_report_load_n(addr, real_size) or
__asan_report_store_n(addr, real_size)
is called.
Also, call these two new functions in memset/memcpy
instrumentation.
asan-rt part will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175507
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 19 Feb 2013 09:48:30 +0000 (09:48 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175501
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 19 Feb 2013 07:43:59 +0000 (07:43 +0000)]
Fix capitalization in comment to match function name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175497
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 19 Feb 2013 06:23:44 +0000 (06:23 +0000)]
Grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175493
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 19 Feb 2013 06:02:40 +0000 (06:02 +0000)]
More const correcting of stack coloring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175490
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 19 Feb 2013 05:32:02 +0000 (05:32 +0000)]
Const-correct the stack coloring code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175488
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 19 Feb 2013 04:47:31 +0000 (04:47 +0000)]
Avoid extra DenseMap lookups in StackColoring::calculateLocalLiveness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175487
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 19 Feb 2013 03:56:57 +0000 (03:56 +0000)]
Expand pseudos/macros BteqzT8SltiX16, BteqzT8SltiuX16,
BtnezT8SltiX16, BtnezT8SltiuX16 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175486
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 19 Feb 2013 03:14:22 +0000 (03:14 +0000)]
Make the dump() function const and reduce the number of hash lookups it performs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175485
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 19 Feb 2013 03:06:17 +0000 (03:06 +0000)]
Use a reference into the BlockLiveness DenseMap to avoid repeated hash lookups in collectMarkers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175484
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 19 Feb 2013 02:08:14 +0000 (02:08 +0000)]
Remove some unused private fields from the AArch64MCCodeEmitter. These
fields were only ever set in the constructor. The create method retains
its consistent interface so that these bits can be re-threaded through
the emitter if they're ever needed.
This was found by the -Wunused-private-field Clang warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175482
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Feb 2013 00:52:45 +0000 (00:52 +0000)]
Temporarily revert r175470 for more review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175476
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 19 Feb 2013 00:20:58 +0000 (00:20 +0000)]
Expand pseudos BteqzT8CmpiX16 and BtnezT8CmpiX16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175474
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 18 Feb 2013 23:18:22 +0000 (23:18 +0000)]
Use array_pod_sort instead of std::sort.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175472
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 18 Feb 2013 23:17:16 +0000 (23:17 +0000)]
Check to see if the 'no-builtin' attribute is set before simplifying a library call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175470
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 18 Feb 2013 23:16:42 +0000 (23:16 +0000)]
Add some convenience methods for querying function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175469
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 18 Feb 2013 23:15:21 +0000 (23:15 +0000)]
X86FrameLowering.cpp: Fixup. Sorry for the breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175467
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 18 Feb 2013 23:11:17 +0000 (23:11 +0000)]
Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments.
Also removes some redundant DNI comments on function declarations already
using the macro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175466
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 18 Feb 2013 23:08:49 +0000 (23:08 +0000)]
X86FrameLowering.cpp: Fix a warning in -Asserts. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175464
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 18 Feb 2013 22:20:16 +0000 (22:20 +0000)]
Remove a useless assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175463
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 18 Feb 2013 21:59:15 +0000 (21:59 +0000)]
Comment out the rdar number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175460
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 18 Feb 2013 21:46:28 +0000 (21:46 +0000)]
[fast-isel] Remove an invalid assert.
If the memcpy has an odd length with an alignment of 2, this would incorrectly
assert on the last 1 byte copy.
rdar://
13202135
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175459
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 18 Feb 2013 21:45:01 +0000 (21:45 +0000)]
Fix a 32/64 bit incompatibility in the HiPE prologue generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175458
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 18 Feb 2013 20:55:12 +0000 (20:55 +0000)]
Support for HiPE-compatible code emission, patch by Yiannis Tsiouris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175457
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 18 Feb 2013 20:13:59 +0000 (20:13 +0000)]
[ms-inline asm] Remove a redundant call to the setHasMSInlineAsm function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175456
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 18 Feb 2013 18:49:44 +0000 (18:49 +0000)]
Use llvm::cast instead of reinterpret_cast.
Also, GetElementPtrInst::getType() method returns SequentialType now, instead of
PointerType. There wasn't any issue yet, so no testcase attached.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175452
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 18 Feb 2013 16:03:04 +0000 (16:03 +0000)]
Add front/back/erase to MapVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175449
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Mon, 18 Feb 2013 14:11:28 +0000 (14:11 +0000)]
R600/SI: Use MULADD_IEEE/V_MAD_F32 instruction for mad pattern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175446
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Mon, 18 Feb 2013 14:11:19 +0000 (14:11 +0000)]
R600: Support for TBO
NOTE: This is a candidate for the Mesa stable branch.
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175445
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Mon, 18 Feb 2013 13:48:09 +0000 (13:48 +0000)]
R600: Increase number of ArrayBase Reg to 32
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175443
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 18 Feb 2013 13:47:02 +0000 (13:47 +0000)]
[asan] revert r175266 as it breaks code with packed structures. supporting long double will require a more general solution
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175442
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 18 Feb 2013 12:09:51 +0000 (12:09 +0000)]
Futureproof AttrBuild if we ever have more than 64 attr enum values.
Currently we're at 34. Bitset should compile into virtually the same code as
uint64_t here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175437
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 18 Feb 2013 11:53:37 +0000 (11:53 +0000)]
Revert CMake version bump since we don't actually need 2.8.6 any more.
The problem call was removed in the interim. Apologies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175435
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 18 Feb 2013 11:41:04 +0000 (11:41 +0000)]
Note minimum required version of CMake
We already use features from 2.8.6, this just gives a slightly more friendly
message when the dependency isn't met.
Patch from Keith Walker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175434
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 18 Feb 2013 11:08:37 +0000 (11:08 +0000)]
AArch64: adjust tests which rely on a default JIT
Profiling tests *do* need a JIT. They'll pass if a cross-compiler targetting
AArch64 by default has been built, but fail if a native AArch64 compiler has
been build. Therefore XFAIL is inappropriate and we mark them unsupported.
ExecutionEngine tests are JIT by definition, they should also be unsupported.
Transforms/LICM only uses the interpreter to check the output is still sane
after optimisation. It can be switched to use an interpreter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175433
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 18 Feb 2013 08:04:16 +0000 (08:04 +0000)]
Add `unsigned DISubprogram::getFlags() const` for DragonEgg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175430
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 18 Feb 2013 07:54:55 +0000 (07:54 +0000)]
Add `DIFile DISubprogram::getFile() const` for DragonEgg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175428
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 18 Feb 2013 07:27:30 +0000 (07:27 +0000)]
DIBuilder: Correct the null/0 type of trailing fields in struct debug info.
Paired with an Clang commit so this may cause temporary build failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175426
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 18 Feb 2013 07:10:22 +0000 (07:10 +0000)]
DIBuilder: Add function and method definitions to the list of all subprograms
Previously we seemed to be assuming that all functions were definitions and all
methods were declarations. This may be consistent with how Clang uses DIBuilder
but doesn't have to be true of all clients (such as DragonEgg).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175423
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 18 Feb 2013 07:06:48 +0000 (07:06 +0000)]
[ms-inline asm] Fix undefined behavior to reset hasMSInlineAsm in advance of SelectAllBasicBlocks().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175422
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 18 Feb 2013 06:41:57 +0000 (06:41 +0000)]
Narrow the return types of a few DIBuilder utility functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175421
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 18 Feb 2013 05:43:03 +0000 (05:43 +0000)]
Expand macro/pseudo instructions BtnezT8SltX16 and BtnezT8SltuX16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175420
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 18 Feb 2013 04:55:38 +0000 (04:55 +0000)]
Expand pseudo/macro BteqzT8SltuX16 . There is no test case because
at this time, llvm is generating a different but equivalent pattern
that would lead to this instruction. I am trying to think of a way
to get it to generate this. If I can't, I may just remove the pseudo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175419
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 18 Feb 2013 04:04:26 +0000 (04:04 +0000)]
Expand pseudo/macro BteqzT8SltX16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175417
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 18 Feb 2013 03:06:29 +0000 (03:06 +0000)]
Expand macro/pseudo BteqzT8CmpX16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175416
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Rosenberg [Mon, 18 Feb 2013 02:44:09 +0000 (02:44 +0000)]
Spelling corrections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175415
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 18 Feb 2013 00:59:04 +0000 (00:59 +0000)]
Beginning of expanding all current mips16 macro/pseudo instruction sequences.
This expansion will be moved to expandISelPseudos as soon as I can figure
out how to do that. There are other instructions which use this
ExpandFEXT_T8I816_ins and as soon as I have finished expanding them all,
I will delete the macro asm string text so it has no way to be used
in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175413
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 17 Feb 2013 23:34:14 +0000 (23:34 +0000)]
X86: Add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175408
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Sun, 17 Feb 2013 22:38:05 +0000 (22:38 +0000)]
[XCore] Add missing 2r instructions.
These instructions are not targeted by the compiler but it is needed for
the MC layer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175407
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Sun, 17 Feb 2013 22:32:41 +0000 (22:32 +0000)]
[XCore] Add TSETR instruction.
This instruction is not targeted by the compiler but it is needed for the
MC layer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175406
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Sun, 17 Feb 2013 20:44:48 +0000 (20:44 +0000)]
[XCore] Add missing u10 / lu10 instructions.
These instructions are not targeted by the compiler but they are
needed for the MC layer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175404
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Sun, 17 Feb 2013 20:43:17 +0000 (20:43 +0000)]
[XCore] Add missing u6 / lu6 instructions.
These instructions are not targeted by the compiler but they are
needed for the MC layer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175403
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sun, 17 Feb 2013 18:35:25 +0000 (18:35 +0000)]
Return false instead of 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175402
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 17 Feb 2013 18:26:11 +0000 (18:26 +0000)]
Force a cpu for test. It failed on atom due to different scheduling decisions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175401
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 17 Feb 2013 17:55:32 +0000 (17:55 +0000)]
AArch64: Avoid shifts by 64, that's undefined behavior.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175400
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 17 Feb 2013 16:35:51 +0000 (16:35 +0000)]
Add multithreading functions and shutdown to the C API. Patch by Moritz
Maxeiner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175398
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 17 Feb 2013 15:59:26 +0000 (15:59 +0000)]
BBVectorize: Fix an invalid reference bug
This fixes PR15289. This bug was introduced (recently) in r175215; collecting
all std::vector references for candidate pairs to delete at once is invalid
because subsequent lookups in the owning DenseMap could invalidate the
references.
bugpoint was able to reduce a useful test case. Unfortunately, because whether
or not this asserts depends on memory layout, this test case will sometimes
appear to produce valid output. Nevertheless, running under valgrind will
reveal the error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175397
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 17 Feb 2013 14:30:32 +0000 (14:30 +0000)]
Make the visibility of LLVMPPCCompilationCallback work with GCC.
GCC warns about the attribute being ignored if it occurs after void*.
There seems to be some kind of incompatibility between clang and gcc here, but
I can't fathom who's right.
void* LLVM_LIBRARY_VISIBILITY foo(); // clang: hidden, gcc: default
LLVM_LIBRARY_VISIBILITY void *bar(); // clang: hidden, gcc: hidden
void LLVM_LIBRARY_VISIBILITY qux(); // clang: hidden, gcc: hidden
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175394
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 17 Feb 2013 11:09:00 +0000 (11:09 +0000)]
Remove use of reverse iterators in repairIntervalsInRange(). While they were
arguably better than forward iterators for this use case, they are confusing and
there are some implementation problems with reverse iterators and MI bundles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175393
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 17 Feb 2013 03:48:23 +0000 (03:48 +0000)]
Use ArrayRef instead of a reference to a SmallVectorImpl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175385
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 17 Feb 2013 01:45:04 +0000 (01:45 +0000)]
Fix a conversion from a forward iterator to a reverse iterator in
MachineBasicBlock::SplitCriticalEdge. Since this is an iterator rather than
an instr_iterator, the isBundled() check only passes if getFirstTerminator()
returned end() and the garbage memory happens to lean that way.
Multiple successors can be present without any terminator instructions in the
case of exception handling with a fallthrough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175383
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 17 Feb 2013 00:10:44 +0000 (00:10 +0000)]
Add support for updating the LiveIntervals of registers used by 'exotic'
terminators that actually have register uses when splitting critical edges.
This commit also introduces a method repairIntervalsInRange() on LiveIntervals,
which allows for repairing LiveIntervals in a small range after an arbitrary
target hook modifies, inserts, and removes instructions. It's pretty limited
right now, but I hope to extend it to support all of the things that are done
by the convertToThreeAddress() target hooks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175382
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 16 Feb 2013 23:41:36 +0000 (23:41 +0000)]
The transform is:
(or (bool?A:B),(bool?C:D)) --> (bool?(or A,C):(or B,D))
By the time the OR is visited, both the SELECTs have been visited and not
optimized and the OR itself hasn't been transformed so we do this transform in
the hopes that the new ORs will be optimized.
The transform is explicitly disabled for vector-selects until "codegen matures
to handle them better".
Patch by Muhammad Tauqir!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175380
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sat, 16 Feb 2013 23:39:52 +0000 (23:39 +0000)]
Clean up mips16 td file in preparation for massive pseudo lowering work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175379
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sat, 16 Feb 2013 20:07:40 +0000 (20:07 +0000)]
Documentation: correct syntax (one missing comma, one extra comma)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175375
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 16 Feb 2013 19:22:28 +0000 (19:22 +0000)]
GCC doesn't like ++ on enums.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175373
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 16 Feb 2013 19:15:28 +0000 (19:15 +0000)]
Remove comma at the end of enum. Still my favourite C++11 feature.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175372
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Sat, 16 Feb 2013 19:14:59 +0000 (19:14 +0000)]
Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175371
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 16 Feb 2013 19:13:18 +0000 (19:13 +0000)]
Turn the enum attributes DenseSet in AttrBuilder into a set of bits.
Avoids malloc and is a lot denser. We lose iteration over target independent
attributes, but that's a strange interface anyways and didn't have any users
outside of AttrBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175370
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sat, 16 Feb 2013 19:04:29 +0000 (19:04 +0000)]
One more try to make this look nice. I have lots of pseudo lowering
as well as 16/32 bit variants to do and so I want this to look nice
when I do it. I've been experimenting with this. No new test cases
are needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175369
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 16 Feb 2013 17:06:38 +0000 (17:06 +0000)]
Replace erase loop with std::remove_if.
This avoids unnecessary copies. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175367
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 16 Feb 2013 17:06:32 +0000 (17:06 +0000)]
Replace loop with std::find.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175366
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 16 Feb 2013 16:15:42 +0000 (16:15 +0000)]
LegalizeDAG.cpp doesn't need DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175365
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 16 Feb 2013 16:08:15 +0000 (16:08 +0000)]
Reduce indents in LSRInstance::NarrowSearchSpaceByCollapsingUnrolledCode method.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175364
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 16 Feb 2013 16:04:29 +0000 (16:04 +0000)]
[msvc x64] Update X86CompilationCallback_Win64.asm corresponding to r175267.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175363
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 16 Feb 2013 15:47:26 +0000 (15:47 +0000)]
Use const reference instead of vector object when passing an argument to
updateScheduledPressure method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175362
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 16 Feb 2013 15:30:28 +0000 (15:30 +0000)]
Target/R600/CMakeLists.txt: Prune SILowerLiteralConstants.cpp corresponding to r175354.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175361
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 16 Feb 2013 15:00:16 +0000 (15:00 +0000)]
MCParser: Reject .balign with non-pow2 alignments.
GNU as rejects them and there are configure scripts in the wild that check if
the assembler rejects ".align 3" to determine whether the alignment is in bytes
or powers of two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175360
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 16 Feb 2013 13:34:26 +0000 (13:34 +0000)]
Minor cleanups. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175359
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 16 Feb 2013 12:36:32 +0000 (12:36 +0000)]
Add even more constatness in MachineDominators.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175358
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 16 Feb 2013 12:16:56 +0000 (12:16 +0000)]
Replace "check:" wth "CHECK:".
Also fix one test by changing "vpermilps" to "vpshufd".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175357
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Sat, 16 Feb 2013 11:28:36 +0000 (11:28 +0000)]
R600/SI: Add pattern to simplify i64 loading
This is a candidate for the stable branch.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175356
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Sat, 16 Feb 2013 11:28:30 +0000 (11:28 +0000)]
R600/SI: nuke SReg_1 v3
It's completely unnecessary and can be replace with proper
SReg_64 handling instead.
This actually fixes a piglit test on SI.
v2: use correct register class in addRegisterClass,
set special classes as not allocatable
v3: revert setting special classes as not allocateable
This is a candidate for the stable branch.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175355
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Sat, 16 Feb 2013 11:28:22 +0000 (11:28 +0000)]
R600/SI: cleanup literal handling v3
Seems to be allot simpler, and also paves the
way for further improvements.
v2: rebased on master, use 0 in BUFFER_LOAD_FORMAT_XYZW,
use VGPR0 in dummy EXP, avoid compiler warning, break
after encoding the first literal.
v3: correctly use V_ADD_F32_e64
This is a candidate for the stable branch.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175354
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Sat, 16 Feb 2013 11:28:13 +0000 (11:28 +0000)]
R600/SI: replace AllReg_* with [SV]Src_* v2
Mark all the operands that can also have an immediate.
v2: SOFFSET is also an SSrc_32 operand
This is a candidate for the stable branch.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175353
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Sat, 16 Feb 2013 11:28:07 +0000 (11:28 +0000)]
R600/SI: fix VOPC encoding v2
Previously it only worked because of coincident.
v2: fix 64bit versions, use 0x80 (inline 0) instead of SGPR0
for the unused SRC2
This is a candidate for the stable branch.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175352
91177308-0d34-0410-b5e6-
96231b3b80d8