Andrew Trick
e44f0d94f6
whitespace
...
llvm-svn: 127837
2011-03-17 23:46:48 +00:00
Rafael Espindola
ab959a2e68
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
aad34d882d
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
221a014ea3
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
8c0b16b0aa
Refactor into a separate utility function.
...
llvm-svn: 127832
2011-03-17 21:58:19 +00:00
Benjamin Kramer
cfcea12fe2
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
09a51bab5d
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
8630840c30
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
Stuart Hastings
ec54bd755f
Reapply: Add type output to llvm-dis annotations. Patch by Yuri!
...
llvm-svn: 127824
2011-03-17 19:50:04 +00:00
Richard Osborne
6120962d7d
Add XCore intrinsic for setpsc.
...
llvm-svn: 127821
2011-03-17 18:42:05 +00:00
Stuart Hastings
ead01c40e1
Revert 127813 while fixing broken test.
...
llvm-svn: 127814
2011-03-17 16:54:27 +00:00
Stuart Hastings
8e08a786bf
Add type output to llvm-dis. Patch by Yuri!
...
llvm-svn: 127813
2011-03-17 16:30:14 +00:00
Daniel Dunbar
f1d62cfc8f
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
2ef0c69df1
Move more logic into getTypeForExtArgOrReturn.
...
llvm-svn: 127809
2011-03-17 14:53:37 +00:00
Cameron Zwarich
341c36dc8b
Change the signext language in LangRef to closer match zeroext.
...
llvm-svn: 127808
2011-03-17 14:21:58 +00:00
Cameron Zwarich
34e7b3f77e
Rename getTypeForExtendedInteger() to getTypeForExtArgOrReturn().
...
llvm-svn: 127807
2011-03-17 14:21:56 +00:00
Nick Lewycky
b4d763b37d
Add comments for the demanglings. Correct mangled form of operator delete!
...
llvm-svn: 127801
2011-03-17 05:20:12 +00:00
NAKAMURA Takumi
bf9ff6f63b
test/CodeGen/X86/h-registers-1.ll: Add explicit -mtriple=x86_64-linux. It does not need to be checked on x86_64-win32 (aka Win64).
...
llvm-svn: 127800
2011-03-17 04:24:40 +00:00
Nick Lewycky
881e1871dd
Add "swi" which is an obsolete mnemonic for "svc".
...
llvm-svn: 127788
2011-03-17 01:46:14 +00:00
Eli Friedman
e8f2be0c10
A couple new README entries.
...
llvm-svn: 127786
2011-03-17 01:22:09 +00:00
Rafael Espindola
b39c7c7b17
Add support in the LTO library for loading an object from the middle
...
of an file.
llvm-svn: 127781
2011-03-17 00:36:11 +00:00
Joerg Sonnenberger
07de07eeea
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
315b42c354
Rewrite instructions as part of ConnectedVNInfoEqClasses::Distribute.
...
llvm-svn: 127779
2011-03-17 00:23:45 +00:00
NAKAMURA Takumi
5b6198dfb9
test/CodeGen/X86/constant-pool-remat-0.ll: FileCheck-ize and add explicit -mtriple=x86_64-linux.
...
llvm-svn: 127775
2011-03-16 23:01:31 +00:00
Jakob Stoklund Olesen
e14b2b226f
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
c738c96519
Erase virtual registers that are unused after DCE.
...
llvm-svn: 127773
2011-03-16 22:56:13 +00:00
Jakob Stoklund Olesen
e29d63e98a
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
557a82c099
Clarify debugging output.
...
llvm-svn: 127771
2011-03-16 22:56:08 +00:00
Cameron Zwarich
ac106273d4
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
40a9200357
Rename a test to be more inclusive.
...
llvm-svn: 127765
2011-03-16 22:20:12 +00:00
Cameron Zwarich
d1ad9bc277
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
fd95b016fb
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
c871eff3f5
Add XCore intrinsics for setclk, setrdy.
...
llvm-svn: 127761
2011-03-16 21:56:00 +00:00
Renato Golin
a3aeafeb35
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
Cameron Zwarich
49e354bcb6
Add a test for i1 zeroext arguments on x86-64. We currently generate code that
...
conforms to the ABI, but DAGCombine could in theory recognize the sequence of
zext asserts and truncates and generate incorrect code.
llvm-svn: 127754
2011-03-16 20:15:44 +00:00
Richard Osborne
d4346f2388
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
NAKAMURA Takumi
d60e4101e6
test/CodeGen/X86: FileCheck-ize and add actions for x86_64-linux and x86_64-win32.
...
llvm-svn: 127734
2011-03-16 13:53:07 +00:00
NAKAMURA Takumi
0b9e2b0257
test/CodeGen/X86: Add a pattern for Win64.
...
llvm-svn: 127733
2011-03-16 13:52:51 +00:00
NAKAMURA Takumi
c10801e8a5
test/CodeGen/X86: FileCheck-ize and add explicit -mtriple=x86_64-linux. They are useless to Win64 target.
...
llvm-svn: 127732
2011-03-16 13:52:38 +00:00
NAKAMURA Takumi
662892df27
test/CodeGen/X86/byval*.ll: Win64 has not supported byval yet.
...
llvm-svn: 127731
2011-03-16 13:52:20 +00:00
NAKAMURA Takumi
406f02c9ea
test/CodeGen/X86/dyn-stackalloc.ll: FileCheck-ize.
...
llvm-svn: 127730
2011-03-16 13:52:08 +00:00
Cameron Zwarich
7599b106b7
Fix a comment.
...
llvm-svn: 127728
2011-03-16 08:13:42 +00:00
NAKAMURA Takumi
76e68ea916
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
a3d4749e24
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
aaa9b4f824
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
c91fa6d19f
Tidy up. Whitespace and 80 column.
...
llvm-svn: 127721
2011-03-16 01:21:55 +00:00
Devang Patel
39c041cae7
Do not accidently initialize NumDbgValueLost and NumDbgLineLost counts.
...
llvm-svn: 127720
2011-03-16 00:27:57 +00:00
Cameron Zwarich
0454253d7a
Only convert allocas to scalars if it is profitable. The profitability metric I
...
chose is having a non-memcpy/memset use and being larger than any native integer
type. Originally I chose having an access of a size smaller than the total size
of the alloca, but this caused some minor issues on the spirit benchmark where
SRoA runs again after some inlining.
This fixes <rdar://problem/8613163>.
llvm-svn: 127718
2011-03-16 00:13:44 +00:00
Cameron Zwarich
7b0f3c6a1a
Add native integer type TargetData to some existing tests.
...
llvm-svn: 127717
2011-03-16 00:13:40 +00:00
Cameron Zwarich
b51c830f7c
Better use initializer lists.
...
llvm-svn: 127716
2011-03-16 00:13:37 +00:00