Jim Grosbach
b89c5053bf
setExecutable() should default to success if there's nothing custom for it.
...
llvm-svn: 127891
2011-03-18 18:51:03 +00:00
Owen Anderson
c23c6e0c1a
Thumb2 PC-relative loads require a fixup rather than just an immediate.
...
llvm-svn: 127888
2011-03-18 17:42:55 +00:00
Andrew Trick
dd6faad20a
Avoid creating canonical induction variables for non-native types.
...
For example, on 32-bit architecture, don't promote all uses of the IV
to 64-bits just because one use is a 64-bit cast.
Alternate implementation of the patch by Arnaud de Grandmaison.
llvm-svn: 127884
2011-03-18 16:50:32 +00:00
Joerg Sonnenberger
aa8ac259e9
Support explicit argument forms for the X86 string instructions.
...
For now, only the default segments are supported.
llvm-svn: 127875
2011-03-18 11:59:40 +00:00
Che-Liang Chiou
2b173c0443
ptx: fix parameter order that is reversed
...
llvm-svn: 127874
2011-03-18 11:23:56 +00:00
Che-Liang Chiou
f4a2c17cf5
ptx: add unconditional and conditional branch
...
llvm-svn: 127873
2011-03-18 11:08:52 +00:00
NAKAMURA Takumi
cdd69c874f
raw_ostream: [PR6745] Tweak formatting (double)%e for Windows hosts.
...
On MSVCRT and compatible, output of %e is incompatible to Posix by default. Number of exponent digits should be at least 2. "%+03d"
FIXME: Implement our formatter in future!
llvm-svn: 127872
2011-03-18 09:30:10 +00:00
Bill Wendling
8a983f8c3f
Initialize the only-used-with-PPC-double-double parts of the APFloat class. This
...
makes valgrind stop complaining about uninitialized variables being read when it
accesses a bitfield (category) that shares its bits with these variables.
llvm-svn: 127871
2011-03-18 09:09:44 +00:00
Jakob Stoklund Olesen
dbc283787d
Hoist spills when the same value is known to be in less loopy sibling registers.
...
Stack slot real estate is virtually free compared to registers, so it is
advantageous to spill earlier even though the same value is now kept in both a
register and a stack slot.
Also eliminate redundant spills by extending the stack slot live range
underneath reloaded registers.
This can trigger a dead code elimination, removing copies and even reloads that
were only feeding spills.
llvm-svn: 127868
2011-03-18 04:23:06 +00:00
Jakob Stoklund Olesen
2956265983
Accept instructions that read undefined values.
...
This is not supposed to happen, but I have seen the x86 rematter getting
confused when rematerializing partial redefs.
llvm-svn: 127857
2011-03-18 03:06:04 +00:00
Jakob Stoklund Olesen
08bfed9973
Be more accurate about the slot index reading a register when dealing with defs
...
and early clobbers.
Assert when trying to find an undefined value.
llvm-svn: 127856
2011-03-18 03:06:02 +00:00
Rafael Espindola
33eddc52d3
Check RequiresNullTerminator first, or we might read from an invalid address.
...
llvm-svn: 127853
2011-03-18 02:55:51 +00:00
Eli Friedman
64a2b7e4f2
Add a target-specific branchless method for double-width relational
...
comparisons on x86. Essentially, the way this works is that SUB+SBB sets
the relevant flags the same way a double-width CMP would.
This is a substantial improvement over the generic lowering in LLVM. The output
is also shorter than the gcc-generated output; I haven't done any detailed
benchmarking, though.
llvm-svn: 127852
2011-03-18 02:34:11 +00:00
Ted Kremenek
1a2fa05e5f
Augment CrashRecoveryContext to have registered "cleanup" objects that can be used to release resources during a crash.
...
llvm-svn: 127849
2011-03-18 02:05:11 +00:00
Johnny Chen
14f091b6ab
The disassembler for Thumb was wrongly adding 4 to the computed imm32 offset.
...
Remove the offending logic and update the test cases.
llvm-svn: 127843
2011-03-18 00:38:03 +00:00
Andrew Trick
a4b86e96b1
Remove TargetData and ValueTracking includes. I didn't mean for them to sneak in my last checkin.
...
llvm-svn: 127842
2011-03-18 00:36:39 +00:00
Owen Anderson
0753b79795
There are two pseudos in this case that are Thumb mode, not one.
...
llvm-svn: 127840
2011-03-17 23:52:05 +00:00
Andrew Trick
07887af00c
Added isValidRewrite() to check the result of ScalarEvolutionExpander.
...
SCEV may generate expressions composed of multiple pointers, which can
lead to invalid GEP expansion. Until we can teach SCEV to follow strict
pointer rules, make sure no bad GEPs creep into IR.
Fixes rdar://problem/9038671.
llvm-svn: 127839
2011-03-17 23:51:11 +00:00
Andrew Trick
17df72f60b
whitespace
...
llvm-svn: 127837
2011-03-17 23:46:48 +00:00
Rafael Espindola
3ecf930d14
Use RequiresNullTerminator to create buffers without a null terminator
...
instead of copying.
llvm-svn: 127835
2011-03-17 22:18:42 +00:00
Devang Patel
f8c3eb7368
Try to not lose variable's debug info during instcombine.
...
This is done by lowering dbg.declare intrinsic into dbg.value intrinsic.
Radar 9143931.
llvm-svn: 127834
2011-03-17 22:18:16 +00:00
Johnny Chen
41abb5b0f7
It used to be that t_addrmode_s4 was used for both:
...
o A8.6.195 STR (register) -- Encoding T1
o A8.6.193 STR (immediate, Thumb) -- Encoding T1
It has been changed so that now they use different addressing modes
and thus different MC representation (Operand Infos). Modify the
disassembler to reflect the change, and add relevant tests.
llvm-svn: 127833
2011-03-17 22:04:05 +00:00
Devang Patel
3506f02e33
Refactor into a separate utility function.
...
llvm-svn: 127832
2011-03-17 21:58:19 +00:00
Benjamin Kramer
52ffb6ea96
BuildUDIV: If the divisor is even we can simplify the fixup of the multiplied value by introducing an early shift.
...
This allows us to compile "unsigned foo(unsigned x) { return x/28; }" into
shrl $2, %edi
imulq $613566757, %rdi, %rax
shrq $32, %rax
ret
instead of
movl %edi, %eax
imulq $613566757, %rax, %rcx
shrq $32, %rcx
subl %ecx, %eax
shrl %eax
addl %ecx, %eax
shrl $4, %eax
on x86_64
llvm-svn: 127829
2011-03-17 20:39:14 +00:00
Benjamin Kramer
a85996c235
Add an argument to APInt's magic udiv calculation to specify the number of bits that are known zero in the divided number.
...
This will come in handy soon.
llvm-svn: 127828
2011-03-17 20:39:06 +00:00
Jakob Stoklund Olesen
047a25b0b0
Dead code elimination may separate the live interval into multiple connected components.
...
I have convinced myself that it can only happen when a phi value dies. When it
happens, allocate new virtual registers for the components.
llvm-svn: 127827
2011-03-17 20:37:07 +00:00
Richard Osborne
6bad79b514
Add XCore intrinsic for setpsc.
...
llvm-svn: 127821
2011-03-17 18:42:05 +00:00
Daniel Dunbar
0e9d7aeb1f
MC/Mach-O: Fix regression introduced in r126127, this assignment shouldn't have
...
been removed.
llvm-svn: 127812
2011-03-17 16:25:24 +00:00
Cameron Zwarich
cea63dc052
Move more logic into getTypeForExtArgOrReturn.
...
llvm-svn: 127809
2011-03-17 14:53:37 +00:00
Cameron Zwarich
a5746339cc
Rename getTypeForExtendedInteger() to getTypeForExtArgOrReturn().
...
llvm-svn: 127807
2011-03-17 14:21:56 +00:00
Nick Lewycky
50afb5a262
Add comments for the demanglings. Correct mangled form of operator delete!
...
llvm-svn: 127801
2011-03-17 05:20:12 +00:00
Nick Lewycky
9dac4ea71f
Add "swi" which is an obsolete mnemonic for "svc".
...
llvm-svn: 127788
2011-03-17 01:46:14 +00:00
Eli Friedman
dcc256df41
A couple new README entries.
...
llvm-svn: 127786
2011-03-17 01:22:09 +00:00
Joerg Sonnenberger
e37bdf4386
Fix handling of @IDNTPOFF relocations, they need to get STT_TLS.
...
While here, add VK_ARM_TPOFF and VK_ARM_GOTTPOFF, too.
llvm-svn: 127780
2011-03-17 00:35:10 +00:00
Jakob Stoklund Olesen
2786187b43
Rewrite instructions as part of ConnectedVNInfoEqClasses::Distribute.
...
llvm-svn: 127779
2011-03-17 00:23:45 +00:00
Jakob Stoklund Olesen
5c0d2aecc5
Add a LiveRangeEdit delegate callback before shrinking a live range.
...
The register allocator needs to adjust its live interval unions when that happens.
llvm-svn: 127774
2011-03-16 22:56:16 +00:00
Jakob Stoklund Olesen
8751b4e276
Erase virtual registers that are unused after DCE.
...
llvm-svn: 127773
2011-03-16 22:56:13 +00:00
Jakob Stoklund Olesen
940b7d46d3
Tag cached interference with a user-provided tag instead of the virtual register number.
...
The live range of a virtual register may change which invalidates the cached
interference information.
llvm-svn: 127772
2011-03-16 22:56:11 +00:00
Jakob Stoklund Olesen
7b60f4161a
Clarify debugging output.
...
llvm-svn: 127771
2011-03-16 22:56:08 +00:00
Cameron Zwarich
2bb1e45ea3
The x86-64 ABI says that a bool is only guaranteed to be sign-extended to a byte
...
rather than an int. Thankfully, this only causes LLVM to miss optimizations, not
generate incorrect code.
This just fixes the zext at the return. We still insert an i32 ZextAssert when
reading a function's arguments, but it is followed by a truncate and another i8
ZextAssert so it is not optimized.
llvm-svn: 127766
2011-03-16 22:20:18 +00:00
Cameron Zwarich
860d06739b
Don't recompute something that we already have in a local variable.
...
llvm-svn: 127764
2011-03-16 22:20:07 +00:00
Daniel Dunbar
8757b8c000
Revert r127757, "Patch to a fix dwarf relocation problem on ARM. One-line fix
...
plus the test where it used to break.", which broke Clang self-host of a
Debug+Asserts compiler, on OS X.
llvm-svn: 127763
2011-03-16 22:16:39 +00:00
Richard Osborne
8b90369d96
Add XCore intrinsics for setclk, setrdy.
...
llvm-svn: 127761
2011-03-16 21:56:00 +00:00
Renato Golin
bf788a5626
Patch to a fix dwarf relocation problem on ARM. One-line fix plus the test where it used to break.
...
llvm-svn: 127757
2011-03-16 21:05:52 +00:00
Richard Osborne
318e25c620
Add checkevent intrinsic to check if any resources owned by the current thread
...
can event.
llvm-svn: 127741
2011-03-16 18:34:00 +00:00
Cameron Zwarich
c60b47a7e2
Fix a comment.
...
llvm-svn: 127728
2011-03-16 08:13:42 +00:00
NAKAMURA Takumi
341bf54557
lib/Support/raw_ostream.cpp: On mingw, report_fatal_error() should not be called at dtor context.
...
report_fatal_error() invokes exit(). We know report_fatal_error() might not write messages to stderr when any errors were detected on FD == 2.
llvm-svn: 127726
2011-03-16 02:53:39 +00:00
NAKAMURA Takumi
bcbcf099b4
Windows/PathV2.inc: [PR8520] Recognize "NUL" as special (character) file.
...
FIXME: It is a temporal hack. We should detect as many "special file name" as possible.
llvm-svn: 127724
2011-03-16 02:53:32 +00:00
NAKAMURA Takumi
042801b7d2
Windows/Path.inc: [PR6270] PathV1::makeUnique(): Give arbitrary initial seed for workaround.
...
FIXME: We should use sys::fs::unique_file() in future.
llvm-svn: 127723
2011-03-16 02:53:24 +00:00
Jim Grosbach
c68c99f640
Tidy up. Whitespace and 80 column.
...
llvm-svn: 127721
2011-03-16 01:21:55 +00:00