Commit Graph

89930 Commits

Author SHA1 Message Date
Jakub Staszak
fef8b70f9d Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175559 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 21:49:54 +00:00
Arnold Schwaighofer
909a0e0e95 ARM NEON: Don't need COPY_TO_REGCLASS in pattern
In my previous commit:
"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."

I added a pattern containing a copy_to_regclass. The copy_to_regclass is
actually not needed.

radar://13191881

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175555 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 20:16:45 +00:00
Nadav Rotem
03544ec2a4 Fix a bug in mayHaveSideEffects. Functions that do not return are now considered as instructions with side effects.
rdar://13227456



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175553 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 20:02:09 +00:00
Nadav Rotem
a175396816 Fix a bug that was found by the clang static analyzer. The var "AT" is null so we cant deref it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175550 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 19:36:59 +00:00
Dan Gohman
a8eae3e358 Whitelist files and block devices instead of blacklisting fifos and
character devices.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175549 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 19:36:55 +00:00
Dan Gohman
2b49dec41b Don't trust st_size of a character device. This fixes using
/dev/stdin as an input when stdin is connected to a tty, for example.

No test, because it's difficult to write a reasonably portable test
for this. /dev/stdin isn't a character device when stdin is redirected
from a file or connected to a pipe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175542 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 18:57:53 +00:00
Jim Grosbach
4fd4c91c40 ARM: Allocation hints must make sure to be in the alloc order.
When creating an allocation hint for a register pair, make sure the hint
for the physical register reference is still in the allocation order.

rdar://13240556

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175541 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 18:55:36 +00:00
Jakob Stoklund Olesen
da5f1ed640 Assert that the target provided hints are in the allocation order.
Target implementations of getRegAllocationHints() should use the
provided allocation order, and they can never return hints outside the
order. This is already documented in TargetRegisterInfo.h.

<rdar://problem/13240556>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175540 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 18:41:01 +00:00
Douglas Gregor
1f1713ff7a 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
2013-02-19 18:26:07 +00:00
Jyotsna Verma
383c6fc458 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
2013-02-19 18:18:36 +00:00
Benjamin Kramer
b1e1d5d4a5 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
2013-02-19 17:32:57 +00:00
Rafael Espindola
e5a83d15b2 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
2013-02-19 17:14:33 +00:00
Eli Bendersky
a4a40080f2 Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175530 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 17:11:48 +00:00
Benjamin Kramer
063337309e 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
2013-02-19 16:51:44 +00:00
Eli Bendersky
26a5c4dd31 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
2013-02-19 16:47:59 +00:00
Eli Bendersky
faec9a3396 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
2013-02-19 16:38:32 +00:00
Arnold Schwaighofer
2e750c12e9 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
2013-02-19 15:27:05 +00:00
Tom Stellard
e5839d0fc9 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
2013-02-19 15:22:47 +00:00
Tom Stellard
2b4b68d936 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
2013-02-19 15:22:45 +00:00
Tom Stellard
23339b68e2 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
2013-02-19 15:22:44 +00:00
Tom Stellard
403554c658 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
2013-02-19 15:22:42 +00:00
Alexey Samsonov
9f306bdc70 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
2013-02-19 11:35:39 +00:00
Kostya Serebryany
6ecccdbb2b [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
2013-02-19 11:29:21 +00:00
Jakub Staszak
c61e83e6de Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175501 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 09:48:30 +00:00
Craig Topper
ff3139fe53 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
2013-02-19 07:43:59 +00:00
Eric Christopher
4913d7b3b2 Grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175493 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 06:23:44 +00:00
Craig Topper
261abf5f40 More const correcting of stack coloring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175490 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 06:02:40 +00:00
Craig Topper
04fbcb5943 Const-correct the stack coloring code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175488 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 05:32:02 +00:00
Craig Topper
cede038867 Avoid extra DenseMap lookups in StackColoring::calculateLocalLiveness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175487 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 04:47:31 +00:00
Reed Kotler
8a20844e27 Expand pseudos/macros BteqzT8SltiX16, BteqzT8SltiuX16,
BtnezT8SltiX16, BtnezT8SltiuX16 .



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175486 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 03:56:57 +00:00
Craig Topper
cbc6d79705 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
2013-02-19 03:14:22 +00:00
Craig Topper
252d798fc3 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
2013-02-19 03:06:17 +00:00
Chandler Carruth
2878b7d7ab 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
2013-02-19 02:08:14 +00:00
Bill Wendling
df8a668e3f Temporarily revert r175470 for more review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175476 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 00:52:45 +00:00
Reed Kotler
f801675207 Expand pseudos BteqzT8CmpiX16 and BtnezT8CmpiX16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175474 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 00:20:58 +00:00
Jakub Staszak
56f58ad0e4 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
2013-02-18 23:18:22 +00:00
Bill Wendling
2af5035a1d 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
2013-02-18 23:17:16 +00:00
Bill Wendling
5b0a8d9ca6 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
2013-02-18 23:16:42 +00:00
NAKAMURA Takumi
9d7c53af30 X86FrameLowering.cpp: Fixup. Sorry for the breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175467 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 23:15:21 +00:00
David Blaikie
a39058aaed 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
2013-02-18 23:11:17 +00:00
NAKAMURA Takumi
82f7815e6f 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
2013-02-18 23:08:49 +00:00
Chad Rosier
20ea2bc391 Remove a useless assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175463 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 22:20:16 +00:00
Chad Rosier
69c65b0d93 Comment out the rdar number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175460 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 21:59:15 +00:00
Chad Rosier
848c25ddfa [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
2013-02-18 21:46:28 +00:00
Benjamin Kramer
6228999d82 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
2013-02-18 21:45:01 +00:00
Benjamin Kramer
98fbe27ac8 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
2013-02-18 20:55:12 +00:00
Chad Rosier
b875acda98 [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
2013-02-18 20:13:59 +00:00
Jakub Staszak
fbed8555ad 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
2013-02-18 18:49:44 +00:00
Douglas Gregor
888fae7b49 Add front/back/erase to MapVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175449 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 16:03:04 +00:00
Vincent Lejeune
e3111964a0 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
2013-02-18 14:11:28 +00:00