Chris Lattner
adf38b3e09
change instcombine to not turn a call to non-varargs bitcast of
...
function prototype into a call to a varargs prototype. We do
allow the xform if we have a definition, but otherwise we don't
want to risk that we're changing the abi in a subtle way. On
X86-64, for example, varargs require passing stuff in %al.
llvm-svn: 126363
2011-02-24 05:10:56 +00:00
Evan Cheng
3923466e82
Fix bug in X86 folding / unfolding table. Int_CMPSDrm and Int_CMPSSrm memory
...
operands starts at index 2, not 1.
rdar://9045024
PR9305
llvm-svn: 126359
2011-02-24 02:36:52 +00:00
Jakob Stoklund Olesen
2b4ded329d
Use the same spill slot for all live ranges that descend form the same original
...
register.
This avoids some silly stack slot shuffling when both sides of a copy get
spilled.
llvm-svn: 126353
2011-02-24 01:07:55 +00:00
Michael J. Spencer
a5a8defa92
Depricate PathV1::isAbsolute.
...
llvm-svn: 126348
2011-02-24 01:02:32 +00:00
Devang Patel
7b0f796c55
Use DW_FORM_data2 for DW_AT_language and let users use DW_LANG_lo_user=0x8000 to DW_LANG_hi_user=0xffff range.
...
llvm-svn: 126339
2011-02-23 22:37:04 +00:00
Devang Patel
37e056e455
Check only relevant strings in output to increase stability of the tests.
...
llvm-svn: 126338
2011-02-23 22:35:57 +00:00
Jim Grosbach
fe4858f269
Remove file. Previous commit deleted content, but left the file around.
...
llvm-svn: 126337
2011-02-23 21:43:31 +00:00
Jim Grosbach
0c03a3a146
Revert r125595, which is an X86-only undocumented assembly syntax extension
...
enabled for all targets. Non-X86 targets should not have this behavior
enabled by default.
Joerg, if you would like to resubmit with the behavior conditionalized to be
X86-ELF only, that's fine.
llvm-svn: 126336
2011-02-23 21:26:51 +00:00
Rafael Espindola
9e18e96264
Put in the symbol table symbols only used in a .globl statement.
...
Fixes PR9292.
llvm-svn: 126330
2011-02-23 20:22:07 +00:00
Richard Osborne
bfa5cc0e08
Add XCore intrinsic for clre instruction.
...
llvm-svn: 126322
2011-02-23 18:52:05 +00:00
Richard Osborne
4995b05f56
Add llvm.xcore.waitevent intrinsic. The effect of this intrinsic is to enable
...
events on the thread and wait until a resource is ready to event. The vector
of the resource that is ready is returned.
llvm-svn: 126320
2011-02-23 18:35:59 +00:00
Jakob Stoklund Olesen
ed172998a6
It is safe to ignore LastSplitPoint when the variable is not live out.
...
No code will be inserted after the split point anyway.
llvm-svn: 126319
2011-02-23 18:26:31 +00:00
Richard Osborne
2c610aa3ed
Add XCore intrinsic for the setv instruction.
...
llvm-svn: 126315
2011-02-23 16:46:37 +00:00
Richard Osborne
12377e0947
Fix format for setc instruction.
...
llvm-svn: 126314
2011-02-23 15:20:16 +00:00
Richard Osborne
aab96995f6
Add XCore intrinsic for settw instruction.
...
llvm-svn: 126313
2011-02-23 14:45:03 +00:00
Frits van Bommel
026982e24f
Implement TODO for implicit C-array-to-ArrayRef conversion.
...
llvm-svn: 126311
2011-02-23 13:43:06 +00:00
Oscar Fuentes
2ece0b171f
Export TARGET_TRIPLE on LLVM.cmake. It is necessary for running tests
...
on Clang when it builds using LLVM as an external library.
Fixes PR9293.
llvm-svn: 126309
2011-02-23 11:28:40 +00:00
Sean Callanan
34770edf43
Fixed a bug in the enhanced disassembler that caused
...
it to ignore valid uses of FS and GS as additional
base registers in address computations. Added a test
case for this.
llvm-svn: 126302
2011-02-23 03:31:28 +00:00
Sean Callanan
be81988c99
Fixed a bug in the enhanced disassembly tester that
...
caused it to only parse one line of input.
llvm-svn: 126301
2011-02-23 03:29:41 +00:00
Evan Cheng
97e6428014
Change VFPNeonA8 definition to make the code easier to read.
...
llvm-svn: 126298
2011-02-23 02:35:33 +00:00
Stuart Hastings
bf83659d11
Omit private_extern declarations of extern symbols; followup to
...
r124468. Patch by Rafael Avila de Espindola!
llvm-svn: 126297
2011-02-23 02:27:05 +00:00
Evan Cheng
d6b641e5bc
More fcopysign correctness and performance fix.
...
The previous codegen for the slow path (when values are in VFP / NEON
registers) was incorrect if the source is NaN.
The new codegen uses NEON vbsl instruction to copy the sign bit. e.g.
vmov.i32 d1, #0x80000000
vbsl d1, d2, d0
If NEON is not available, it uses integer instructions to copy the sign bit.
rdar://9034702
llvm-svn: 126295
2011-02-23 02:24:55 +00:00
Jakob Stoklund Olesen
b51f65c297
Keep track of how many times a live range has been dequeued, and prioritize new ranges.
...
When a large live range is evicted, it will usually be split when it comes
around again. By deferring evicted live ranges, the splitting happens at a time
when the interference pattern is more realistic. This prevents repeated
splitting and evictions.
llvm-svn: 126282
2011-02-23 00:56:56 +00:00
Jakob Stoklund Olesen
37de3235e5
Fix a bug in determining if there is only a single interfering register.
...
llvm-svn: 126277
2011-02-23 00:29:55 +00:00
Jakob Stoklund Olesen
6bd68cdffb
Be more aggressive about evicting interference.
...
Use interval sizes instead of spill weights to determine if it is legal to evict
interference. A smaller interval can evict interference if all interfering live
ranges are larger.
Allow multiple interferences to be evicted as along as they are all larger than
the live range being allocated.
Spill weights are still used to select the preferred eviction candidate.
llvm-svn: 126276
2011-02-23 00:29:52 +00:00
David Greene
9a6040dc86
[AVX] General VUNPCKL codegen support.
...
llvm-svn: 126264
2011-02-22 23:31:46 +00:00
David Greene
5ec8236d9d
Fix Builder::execute() to more properly pass the desired environment
...
to tools.
llvm-svn: 126263
2011-02-22 23:30:45 +00:00
Jakob Stoklund Olesen
2329c542e9
Change the RAGreedy register assignment order so large live ranges are allocated first.
...
This is based on the observation that long live ranges are more difficult to
allocate, so there is a better chance of solving the puzzle by handling the big
pieces first. The allocator will evict and split long alive ranges when they get
in the way.
RABasic is still using spill weights for its priority queue, so the interface to
the queue has been virtualized.
llvm-svn: 126259
2011-02-22 23:01:52 +00:00
Jakob Stoklund Olesen
fbad93fa13
80 Col.
...
llvm-svn: 126258
2011-02-22 23:01:49 +00:00
Nick Lewycky
fc7222bfc4
Fix C++0x incompatibility. The signature of std::make_pair<> changes from:
...
template <class T1, class T2> pair<T1,T2> make_pair(const T1&, const T2&);
to
template <class T1, class T2> pair<V1, V2> make_pair(T1&&, T2&&);
so explicitly specifying the template arguments to make_pair<> is going to break
when C++0x rolls through. Replace them with equivalent std::pair<>. Patch by
James Dennett!
llvm-svn: 126256
2011-02-22 22:48:47 +00:00
Cameron Zwarich
826308586c
Make LoopDeletion work on loops with multiple edges, as long as the incoming
...
values from all of the loop's exiting blocks are equal. Patch by Andrew Clinton.
llvm-svn: 126253
2011-02-22 22:25:39 +00:00
Joerg Sonnenberger
b7e635dcad
Use the same (%dx) hack for in[bwl] as for out[bwl].
...
llvm-svn: 126244
2011-02-22 20:40:09 +00:00
Evan Cheng
04ad35b53f
VFP single precision arith instructions can go down to NEON pipeline, but on Cortex-A8 only.
...
llvm-svn: 126238
2011-02-22 19:53:14 +00:00
Devang Patel
9b4127349c
Follow LLVM coding style.
...
clang uses DBuilder, so it requries corresponding change.
llvm-svn: 126231
2011-02-22 18:56:12 +00:00
Roman Divacky
e8a93fe8f0
Stack alignment is 16 bytes on FreeBSD/i386 too.
...
llvm-svn: 126226
2011-02-22 17:30:05 +00:00
Joerg Sonnenberger
4f864d3111
Bug#9172: Don't use static in file scope, use an attribute on the
...
parser.
llvm-svn: 126225
2011-02-22 16:53:11 +00:00
Oscar Fuentes
ab0465020b
CMake: remove unnecessary variable.
...
llvm-svn: 126224
2011-02-22 15:40:20 +00:00
Cameron Zwarich
7cf88763e0
MachineConstantPoolValues are not uniqued, so they need to be freed if they
...
share entries. Add a DenseSet to MachineConstantPool for the MachineCPVs that
it owns.
This will hopefully fix the MC/ARM/elf-reloc-01.ll failure on the leaks bots.
llvm-svn: 126218
2011-02-22 08:54:30 +00:00
NAKAMURA Takumi
7f5aa90d62
Revert r126195, "test/CodeGen/X86/vec_cast.ll: Mark as XFAIL: migw,win32 for workaround of PR8311."
...
It seems it affected configuration --target=i686-pc-mingw32, I don't know and will investigate why.
llvm-svn: 126217
2011-02-22 08:22:54 +00:00
NAKAMURA Takumi
bced59bba7
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126216
2011-02-22 07:21:59 +00:00
NAKAMURA Takumi
384490cbe1
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126215
2011-02-22 07:21:51 +00:00
NAKAMURA Takumi
2a1ca28203
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126214
2011-02-22 07:21:42 +00:00
NAKAMURA Takumi
fae5813d40
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126213
2011-02-22 07:21:33 +00:00
NAKAMURA Takumi
4d9d6ed377
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126212
2011-02-22 07:21:25 +00:00
NAKAMURA Takumi
af669e5a4e
Relax expressions and add explicit triplets -linux and -win32.
...
On @foobar(double %d, double* %x),
AMD64: (%xmm0, %rdi)
Win64: (%xmm0, %rdx) (not %rcx!)
llvm-svn: 126211
2011-02-22 07:21:17 +00:00
NAKAMURA Takumi
a1e2ed5f1b
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126210
2011-02-22 07:21:08 +00:00
NAKAMURA Takumi
e38080bd8e
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126209
2011-02-22 07:21:01 +00:00
NAKAMURA Takumi
e463e07bd5
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126208
2011-02-22 07:20:52 +00:00
NAKAMURA Takumi
0e9c4e50ac
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126207
2011-02-22 07:20:44 +00:00
NAKAMURA Takumi
3632cf8e6b
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126206
2011-02-22 07:20:35 +00:00
NAKAMURA Takumi
09ee8a7f92
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126205
2011-02-22 07:20:26 +00:00
NAKAMURA Takumi
a403732301
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126204
2011-02-22 07:20:18 +00:00
NAKAMURA Takumi
3940b8fd65
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126203
2011-02-22 07:20:10 +00:00
NAKAMURA Takumi
eaf128bde6
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126202
2011-02-22 07:20:02 +00:00
NAKAMURA Takumi
82cd8e9ebb
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126201
2011-02-22 07:19:54 +00:00
NAKAMURA Takumi
83c40bc7ad
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126200
2011-02-22 07:19:46 +00:00
NAKAMURA Takumi
3bfc830a9a
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126199
2011-02-22 07:19:37 +00:00
NAKAMURA Takumi
46e7e345e2
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126198
2011-02-22 07:19:28 +00:00
NAKAMURA Takumi
eff7bdb792
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126197
2011-02-22 07:19:20 +00:00
NAKAMURA Takumi
6df04c2d20
Relax expressions and add explicit triplets -linux and -win32.
...
llvm-svn: 126196
2011-02-22 07:19:12 +00:00
NAKAMURA Takumi
f4e6f323cb
test/CodeGen/X86/vec_cast.ll: Mark as XFAIL: migw,win32 for workaround of PR8311.
...
llvm-svn: 126195
2011-02-22 07:19:03 +00:00
NAKAMURA Takumi
9cb20ac2e8
test/CodeGen/X86/red-zone.ll: Add explicit -mtriple=x86_64-linux.
...
Redzone is not applicable on Win64.
llvm-svn: 126194
2011-02-22 07:18:55 +00:00
Evan Cheng
666cf56668
Guard against de-referencing MBB.end().
...
llvm-svn: 126192
2011-02-22 07:07:59 +00:00
Evan Cheng
2ce663031f
available_externally (hidden or not) GVs are always accessed via stubs. rdar://9027648.
...
llvm-svn: 126191
2011-02-22 06:58:34 +00:00
Andrew Trick
842921dfc8
VirtRegRewriter assertion fix.
...
Apparently it's ok for multiple operands to "kill" the same register.
Fixes PR9237.
llvm-svn: 126190
2011-02-22 06:52:56 +00:00
Cameron Zwarich
f8b22b3483
Roll out r126169 and r126170 in an attempt to fix the selfhost bot.
...
llvm-svn: 126185
2011-02-22 03:24:52 +00:00
Sean Callanan
c1b7775e0f
Added a testcase for the enhanced disassembly bug
...
fixed in r126147, where a field in the X86 decode
structure was being read as bits, not bytes.
llvm-svn: 126182
2011-02-22 02:19:18 +00:00
Sean Callanan
5b23294799
Fixed llvm-mc in edis mode to use the result of
...
operand.evaluate as an error code, not as the
contents of the operand.
llvm-svn: 126181
2011-02-22 02:09:15 +00:00
Sean Callanan
7d2f87b9a8
Fixed lit.cfg to no longer recognize the old
...
edis name as needing expansion. This tool was
been replaced by llvm-mc long ago.
llvm-svn: 126180
2011-02-22 02:05:53 +00:00
Eric Christopher
919772fd5d
Only use blx for external function calls on thumb, these could be fixed
...
up by the dynamic linker, but it's better to use the correct instruction
to begin with.
Fixes rdar://9011034
llvm-svn: 126176
2011-02-22 01:37:10 +00:00
Cameron Zwarich
6785a24c41
Eliminate valgrind warnings from Python on the 32-bit as well.
...
llvm-svn: 126171
2011-02-22 01:00:10 +00:00
Cameron Zwarich
800f85baf9
Merge information about the number of zero, one, and sign bits of live-out registers
...
at phis. This enables us to eliminate a lot of pointless zexts during the DAGCombine
phase. This fixes <rdar://problem/8760114>.
llvm-svn: 126170
2011-02-22 00:46:27 +00:00
Cameron Zwarich
f248f945c8
Have isel visit blocks in reverse postorder rather than an undefined order. This
...
allows for the information propagated across basic blocks to be merged at phis.
llvm-svn: 126169
2011-02-22 00:46:22 +00:00
Joerg Sonnenberger
60e7629258
Recognize loopz and loopnz as aliases for loope and loopne.
...
From Dimitry Andric.
llvm-svn: 126168
2011-02-22 00:43:07 +00:00
Rafael Espindola
e39062199e
Implement xgetbv and xsetbv.
...
Patch by Jai Menon.
llvm-svn: 126165
2011-02-22 00:35:18 +00:00
Eric Christopher
9b48fef478
Revert r125960, it's breaking darwin10 bootstrap.
...
llvm-svn: 126163
2011-02-21 23:52:19 +00:00
Evan Cheng
87a9f19f9c
Skipping over debugvalue instructions to determine whether the split spot is in a IT block. rdar://9030770
...
llvm-svn: 126159
2011-02-21 23:40:47 +00:00
Evan Cheng
b8ed462ca2
Add more debugging output.
...
llvm-svn: 126158
2011-02-21 23:39:48 +00:00
Joerg Sonnenberger
37d5484d18
Handle FK_PCRel_1 and add a test case for this and FK_PCRel_4.
...
llvm-svn: 126157
2011-02-21 23:25:41 +00:00
Devang Patel
f3292b2196
Revert r124611 - "Keep track of incoming argument's location while emitting LiveIns."
...
In other words, do not keep track of argument's location. The debugger (gdb) is not prepared to see line table entries for arguments. For the debugger, "second" line table entry marks beginning of function body.
This requires some coordination with debugger to get this working.
- The debugger needs to be aware of prolog_end attribute attached with line table entries.
- The compiler needs to accurately mark prolog_end in line table entries (at -O0 and at -O1+)
llvm-svn: 126155
2011-02-21 23:21:26 +00:00
Jakob Stoklund Olesen
60a26a6578
Add SplitKit::isOriginalEndpoint and use it to force live range splitting to terminate.
...
An original endpoint is an instruction that killed or defined the original live
range before any live ranges were split.
When splitting global live ranges, avoid creating local live ranges without any
original endpoints. We may still create global live ranges without original
endpoints, but such a range won't be split again, and live range splitting still
terminates.
llvm-svn: 126151
2011-02-21 23:09:46 +00:00
Sean Callanan
5e8603d1b9
Fixed a bug in the X86 disassembler where a member of the
...
X86 instruction decode structure was being interpreted as
being in units of bits, although it is actually stored in
units of bytes.
llvm-svn: 126147
2011-02-21 21:55:05 +00:00
Stuart Hastings
d7927e0fcd
End the line if we return early. Radar 9012638.
...
llvm-svn: 126141
2011-02-21 21:07:07 +00:00
David Greene
55820a6b7b
Add a convenience tool for doing comparison builds of the LLVM
...
ecosystem. This is a handy utility for checking changes before
committing them to the repository.
llvm-svn: 126136
2011-02-21 19:23:22 +00:00
Chris Lattner
22b7495ec8
Better OpenBSD support, patch by Amit Kulkarni. I have no way to test
...
that this doesn't break gold, but it seems reasonable to me.
llvm-svn: 126135
2011-02-21 18:38:56 +00:00
Richard Osborne
1ae65c7cb8
Add XCore intrinsics for various instructions on ports.
...
llvm-svn: 126132
2011-02-21 18:23:30 +00:00
Stuart Hastings
33a3f356ef
Test case for r126127. Radar 9012638.
...
llvm-svn: 126131
2011-02-21 18:08:40 +00:00
Duncan Sands
bda7175a43
The stack should be 16 byte aligned on 32 bit solaris. Patch by Yuri.
...
llvm-svn: 126130
2011-02-21 17:37:17 +00:00
Duncan Sands
ecbbf0825b
If the phi node was used by an unreachable instruction that ends up using
...
itself without going via a phi node then we could return false here in
spite of making a change. Also, tweak the comment because this method
can (and always could) return true without deleting the original phi node.
For example, if the phi node was used by a read-only invoke instruction
which is used by another phi node phi2 which is only used by and only uses
the invoke, then phi2 would be deleted but not the invoke instruction and
not the original phi node.
llvm-svn: 126129
2011-02-21 17:32:05 +00:00
Stuart Hastings
b4863a41e9
Fix to correctly support attribute((section("__DATA, __common"))).
...
Radar 9012638.
llvm-svn: 126127
2011-02-21 17:27:17 +00:00
Chris Lattner
5237febf0c
a serious "compare CSE" issue that is nontrivial to get right,
...
but which is responsible for us doing really bad things to 256.bzip2.
llvm-svn: 126126
2011-02-21 17:03:47 +00:00
Chris Lattner
2333ac279f
fix a crasher in disabled code (on variable stride loops)
...
llvm-svn: 126125
2011-02-21 17:02:55 +00:00
Duncan Sands
6dcd49bc2b
Simplify RecursivelyDeleteDeadPHINode. The only functionality change
...
should be that if the phi is used by a side-effect free instruction with
no uses then the phi and the instruction now get zapped (checked by the
unittest).
llvm-svn: 126124
2011-02-21 16:27:36 +00:00
NAKAMURA Takumi
860abd0f28
Target/X86/X86FastISel: [PR6275] Fix Win32's dllimport function with fastisel.
...
"dllimport" function must not be GlobalVariable, but Function. It is enough to check with GlobalValue.
test/CodeGen/X86/dll-linkage.ll is updated to check llc -O0.
llvm-svn: 126110
2011-02-21 04:50:06 +00:00
Venkatraman Govindaraju
a82203f875
Generate correct Sparc32 ABI compliant code for functions that return a struct.
...
llvm-svn: 126108
2011-02-21 03:42:44 +00:00
NAKAMURA Takumi
66242b85f0
CMake: Define LLVM_INCLUDE_TESTS in cmake/modules/HandleLLVMOptions.cmake. It affects testing stuff on clang-standalone build.
...
llvm-svn: 126107
2011-02-21 03:21:06 +00:00
NAKAMURA Takumi
27b0b5a997
CMake: Fix breakage on clang standalone build.
...
llvm-svn: 126106
2011-02-21 03:20:57 +00:00
Chris Lattner
e9cba7bd34
add a missed loop deletion case.
...
llvm-svn: 126103
2011-02-21 02:13:39 +00:00
Chris Lattner
bc661d6686
Add some (disabled code) to print out negative strides.
...
llvm-svn: 126102
2011-02-21 02:08:54 +00:00
Chris Lattner
659c793a4e
add an idiom that loop idiom could theoretically catch.
...
llvm-svn: 126101
2011-02-21 01:33:38 +00:00