Eli Friedman
3aa2fe389f
Back out r131444 and r131438; they're breaking nightly tests. I'll look into
...
it more tomorrow.
llvm-svn: 131451
2011-05-17 02:36:59 +00:00
Eli Friedman
8c4de16d2b
Add x86 fast-isel for calls returning first-class aggregates. rdar://9435872.
...
llvm-svn: 131438
2011-05-17 00:13:47 +00:00
Owen Anderson
ba8b3af7d8
@llvm.lifetime.begin acts as a load, not @llvm.lifetime.end.
...
llvm-svn: 131437
2011-05-17 00:05:49 +00:00
Jakob Stoklund Olesen
16f11212fc
Teach LiveInterval::isZeroLength about null SlotIndexes.
...
When instructions are deleted, they leave tombstone SlotIndex entries.
The isZeroLength method should ignore these null indexes.
This causes RABasic to sometimes spill a callee-saved register in the
abi-isel.ll test, so don't run that test with -regalloc=basic. Prioritizing
register allocation according to spill weight can cause more registers to be
used.
llvm-svn: 131436
2011-05-16 23:50:05 +00:00
Jim Grosbach
d7352e9b02
Kill some dead code.
...
llvm-svn: 131431
2011-05-16 22:24:07 +00:00
Dan Gohman
9a55240376
Delete unused variables.
...
llvm-svn: 131430
2011-05-16 22:19:54 +00:00
Dan Gohman
9ea3bcc685
Trim #includes.
...
llvm-svn: 131429
2011-05-16 22:14:50 +00:00
Dan Gohman
2d7dc7849f
Fix whitespace and 80-column violations.
...
llvm-svn: 131428
2011-05-16 22:09:53 +00:00
Devang Patel
8cf3c94ae5
There is no need to force DebugLoc on a PHI at this point.
...
llvm-svn: 131427
2011-05-16 22:05:03 +00:00
Jim Grosbach
59a8c1aa5b
Track how many insns fast-isel successfully selects as well as how many it
...
misses.
llvm-svn: 131426
2011-05-16 21:51:07 +00:00
Eli Friedman
23e7691f59
Remove dead code. Fix associated test to use FileCheck.
...
llvm-svn: 131424
2011-05-16 21:28:22 +00:00
Devang Patel
9f871794b6
Preserve debug info for unused zero extended boolean argument.
...
Radar 9422775.
llvm-svn: 131422
2011-05-16 21:24:05 +00:00
Charles Davis
173b0d324a
Add a method I forgot in the last commit. Don't worry, this one passed
...
self-host :).
llvm-svn: 131421
2011-05-16 21:13:58 +00:00
Eli Friedman
cb60e2293f
Make fast-isel work correctly s/uadd.with.overflow intrinsics.
...
llvm-svn: 131420
2011-05-16 21:06:17 +00:00
Eli Friedman
bd237ec411
Fix silly typo.
...
llvm-svn: 131419
2011-05-16 20:34:53 +00:00
Eli Friedman
5f1b7e4153
Basic fast-isel of extractvalue. Not too helpful on its own, given the IR clang generates for cases like this, but it should become more useful soon.
...
llvm-svn: 131417
2011-05-16 20:27:46 +00:00
Jason W Kim
4b3c43cf90
Add a FIXME reminder to remove ForceARMElfPIC switch.
...
llvm-svn: 131411
2011-05-16 16:35:21 +00:00
Rafael Espindola
e0b15205c1
sets bit 0 of the function address of thumb function in .symtab
...
("T is 1 if the target symbol S has type STT_FUNC and the
symbol addresses a Thumb instruction ;it is 0 otherwise."
from "ELF for the ARM Architecture" 4.7.1.2)
Patch by Koan-Sin Tan!
llvm-svn: 131406
2011-05-16 16:17:21 +00:00
Rafael Espindola
1f7c831e4f
Extra refactoring noticed by Eli Friedman.
...
llvm-svn: 131405
2011-05-16 15:48:45 +00:00
Rafael Espindola
113d944ce4
Don't do tail calls in a function that call setjmp. The stack might be
...
corrupted when setjmp returns again.
llvm-svn: 131399
2011-05-16 03:05:33 +00:00
Charles Davis
576f65b4b2
Fix copy-pasto.
...
llvm-svn: 131384
2011-05-15 17:28:27 +00:00
Charles Davis
900df11077
Add stub methods to MCStreamer for emitting Win64 exception-handling
...
information.
llvm-svn: 131382
2011-05-15 17:20:01 +00:00
Benjamin Kramer
5943d0a3ee
SimplifyCFG: Use ComputeMaskedBits to prune dead cases from switch instructions.
...
llvm-svn: 131345
2011-05-14 15:57:25 +00:00
Stuart Hastings
725bd9a3a1
Avoid combining GEPs that might overflow at runtime.
...
rdar://problem/9267970
Patch by Julien Lerouge!
llvm-svn: 131339
2011-05-14 05:55:10 +00:00
Eli Friedman
559f908ca7
Fix a FIXME by moving the fast-isel implementation of the objectsize intrinsic from the x86 code to the generic code.
...
llvm-svn: 131332
2011-05-14 00:47:51 +00:00
Rafael Espindola
98372d430c
Don't produce a vmovntdq if we don't have AVX support.
...
llvm-svn: 131330
2011-05-14 00:30:01 +00:00
Eli Friedman
841249aeb2
Zap useless code; this hasn't done anything useful since fast-isel switched to being bottom-up (a very long time ago).
...
llvm-svn: 131329
2011-05-14 00:19:32 +00:00
Jim Grosbach
86489a32cf
Be a bit more permissive about symbols we don't understand. Just skip them
...
rather than throwing an error.
llvm-svn: 131322
2011-05-13 23:11:30 +00:00
Dylan Noblesmith
e3f823351d
ExecutionEngine: move createJIT() definition (v2)
...
As an ExecutionEngine class function, its definition
really belongs in ExecutionEngine.cpp, not JIT.cpp.
llvm-svn: 131320
2011-05-13 22:02:53 +00:00
Dylan Noblesmith
7181ae008c
ExecutionEngine: push TargetMachine creation into clients (v2)
...
In particular, into EngineBuilder. This should only impact
the private API between the EE and EB classes, not external
clients, since JITCtor and MCJITCtor are both protected members.
llvm-svn: 131317
2011-05-13 21:51:29 +00:00
Dylan Noblesmith
2af2081287
ExecutionEngine: fix JIT/MCJIT selectTarget() duplication (v2)
...
This prepares for making JITCtor/MCJITCtor take a
TargetMachine* directly from clients like EngineBuilder.
llvm-svn: 131316
2011-05-13 21:36:16 +00:00
Jim Grosbach
ed5d966802
Teach the RtDyld to tell the memory manager about how much space a function
...
actually takes rather than how much memory was allocated for it. This
is more accurate and should help the manager pack things more effectively.
llvm-svn: 131305
2011-05-13 20:12:14 +00:00
Rafael Espindola
95d9ad78ea
Make codegen able to handle values of empty types. This is one way
...
to fix PR9900. I will keep it open until sable is able to comment on it.
llvm-svn: 131294
2011-05-13 15:18:06 +00:00
Julien Lerouge
b2c1721752
Fix a source of non determinism in FindUsedTypes, use a SetVector instead of a
...
set.
rdar://9423996
llvm-svn: 131283
2011-05-13 05:20:42 +00:00
Andrew Trick
9bf6279f98
Convert SimplifyIVUsers into a worklist instead of a single pass over
...
the users.
llvm-svn: 131277
2011-05-13 01:12:21 +00:00
Stuart Hastings
5fb280fd39
Since I can't reproduce the failures from 131261, re-trying with a
...
simplified version. <rdar://problem/9298790>
llvm-svn: 131274
2011-05-13 00:51:54 +00:00
Stuart Hastings
b362a9bcc6
Revert 131266 and 131261 due to buildbot complaints.
...
rdar://problem/9298790
llvm-svn: 131269
2011-05-13 00:15:17 +00:00
Stuart Hastings
d106d72681
Non-fast-isel followup to 129634; correctly handle branches controlled
...
by non-CMP expressions. The executable test case (129821) would test
this as well, if we had an "-O0 -disable-arm-fast-isel" LLVM-GCC
tester. Alas, the ARM assembly would be very difficult to check with
FileCheck.
The thumb2-cbnz.ll test is affected; it generates larger code (tst.w
vs. cmp #0 ), but I believe the new version is correct.
rdar://problem/9298790
llvm-svn: 131261
2011-05-12 23:36:41 +00:00
Evan Cheng
43393670c9
Update comment.
...
llvm-svn: 131258
2011-05-12 22:35:48 +00:00
Devang Patel
dd08ae41c6
Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
...
s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g
llvm-svn: 131244
2011-05-12 21:29:42 +00:00
Jim Grosbach
dc7e74edfa
MCJIT section loading should just skip non-text sections rather than
...
erroring out completely. Some modules produce sections that aren't referenced,
so it's friendlier to clients like LLDB to just skip them, at least for now.
llvm-svn: 131243
2011-05-12 21:21:16 +00:00
Evan Cheng
f3eb9e3262
Re-enable branchfolding common code hoisting optimization. Fixed a liveness test bug and also taught it to update liveins.
...
llvm-svn: 131241
2011-05-12 20:30:01 +00:00
Devang Patel
b865dd6a20
Let Objective-C front-end identify class extension, in dwarf output, using an attribute DW_AT_APPLE_objc_class_extension.
...
llvm-svn: 131238
2011-05-12 19:06:16 +00:00
Evan Cheng
2c6e581865
Temporarily disable the transformation. It's breaking 186.crafty in some configuration.
...
llvm-svn: 131235
2011-05-12 18:44:58 +00:00
Jim Grosbach
245420ff79
The MCJIT memory manager needs to initialize its Module member.
...
llvm-svn: 131234
2011-05-12 18:21:23 +00:00
Akira Hatanaka
a57b77b65f
Fix setting of isCommutable flag.
...
llvm-svn: 131233
2011-05-12 17:42:08 +00:00
Evan Cheng
5ff60c7364
Re-commit 131172 with fix. MachineInstr identity checks should check dead
...
markers. In some cases a register def is dead on one path, but not on
another.
This is passing Clang self-hosting.
llvm-svn: 131214
2011-05-12 00:56:58 +00:00
Andrew Trick
3e6beb9889
indvars: Added SimplifyIVUsers.
...
Interleave IV simplifications. Currently involves EliminateComparison
and EliminateRemainder. Next I'll add EliminateExtend.
llvm-svn: 131210
2011-05-12 00:04:28 +00:00
Matt Beaumont-Gay
20dbed0a8b
Remove an unused variable and move a couple others inside DEBUG.
...
llvm-svn: 131208
2011-05-11 23:34:51 +00:00
Jason W Kim
f6c2c6a38e
Address the last bit of relocation flag related divergence betweeen
...
LLVM and binutils.
With this patch, there are no functional differences between the .o
produced directly from LLVM versus the .s to .o via GNU as, for relocation tags
at least, for both PIC and non-PIC modes.
Because some non-PIC reloc tags are used (legally) on PIC, so IsPCRel flag is
necessary but not sufficient to determine whether the overall codegen mode is
PIC or not. Why is this necessary? There is an incompatibility of how relocs
are emitted in the .rodata section. Binutils PIC likes to emit certain relocs
as section relative offsets. Non-PIC does not do this.
So I added a hidden switch on the ELFObjectwriter "-arm-elf-force-pic" which
forces the objectwriter to pretend that all relocs are for PIC mode.
Todo: Activate ForceARMElfPIC to true if -relocation-model=pic is selected
on llc.
Todo: There are probably more issues for PIC mode on ARM/MC/ELF...
Todo: Existing tests in MC/ARM/elf-reloc*.ll need to be converted over to .s
tests as well as expanded to cover the gamut.
llvm-svn: 131205
2011-05-11 22:53:06 +00:00