Chris Lattner [Mon, 7 Jan 2008 04:57:42 +0000 (04:57 +0000)]
remove a dead field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45685
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Jan 2008 04:57:31 +0000 (04:57 +0000)]
the name field of instructions is never set to a non-empty string,
just unconditionally use the def name of the instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45684
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Jan 2008 04:55:09 +0000 (04:55 +0000)]
no need to explicitly clear these fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45683
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Mon, 7 Jan 2008 03:23:52 +0000 (03:23 +0000)]
Removing a leaked file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45681
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Jan 2008 03:13:06 +0000 (03:13 +0000)]
Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45680
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Jan 2008 02:48:55 +0000 (02:48 +0000)]
remove MachineOpCode typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45679
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Jan 2008 02:46:03 +0000 (02:46 +0000)]
remove some uses of MachineOpCode, move getSchedClass
into TargetInstrDescriptor from TargetInstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45678
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Jan 2008 02:39:19 +0000 (02:39 +0000)]
Add predicates methods to TargetOperandInfo, and switch all clients
over to using them, instead of diddling Flags directly. Change the
various flags from const variables to enums.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45677
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Mon, 7 Jan 2008 02:31:11 +0000 (02:31 +0000)]
Setting GlobalDirective in TargetAsmInfo by default rather than
providing a misleading facility. It's used once in the MIPS backend
and hardcoded as "\t.globl\t" everywhere else.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45676
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Mon, 7 Jan 2008 02:29:04 +0000 (02:29 +0000)]
Deleting an empty file. Thanks, /usr/bin/patch!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45675
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Jan 2008 01:56:04 +0000 (01:56 +0000)]
Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflects
that it is cheap and efficient to get.
Move a variety of predicates from TargetInstrInfo into
TargetInstrDescriptor, which makes it much easier to query a predicate
when you don't have TII around. Now you can use MI->getDesc()->isBranch()
instead of going through TII, and this is much more efficient anyway. Not
all of the predicates have been moved over yet.
Update old code that used MI->getInstrDescriptor()->Flags to use the
new predicates in many places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45674
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 7 Jan 2008 01:35:56 +0000 (01:35 +0000)]
Update CodeGen for MRegisterInfo --> TargetInstrInfo changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45673
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 7 Jan 2008 01:35:02 +0000 (01:35 +0000)]
Move even more functionality from MRegisterInfo into TargetInstrInfo.
Some day I'll get it all moved over...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45672
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Mon, 7 Jan 2008 01:33:09 +0000 (01:33 +0000)]
Ammending r45669 with a missing file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45671
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Mon, 7 Jan 2008 01:30:53 +0000 (01:30 +0000)]
With this patch, the LowerGC transformation becomes the
ShadowStackCollector, which additionally has reduced overhead with
no sacrifice in portability.
Considering a function @fun with 8 loop-local roots,
ShadowStackCollector introduces the following overhead
(x86):
; shadowstack prologue
movl L_llvm_gc_root_chain$non_lazy_ptr, %eax
movl (%eax), %ecx
movl $___gc_fun, 20(%esp)
movl $0, 24(%esp)
movl $0, 28(%esp)
movl $0, 32(%esp)
movl $0, 36(%esp)
movl $0, 40(%esp)
movl $0, 44(%esp)
movl $0, 48(%esp)
movl $0, 52(%esp)
movl %ecx, 16(%esp)
leal 16(%esp), %ecx
movl %ecx, (%eax)
; shadowstack loop overhead
(none)
; shadowstack epilogue
movl 48(%esp), %edx
movl %edx, (%ecx)
; shadowstack metadata
.align 3
___gc_fun: # __gc_fun
.long 8
.space 4
In comparison to LowerGC:
; lowergc prologue
movl L_llvm_gc_root_chain$non_lazy_ptr, %eax
movl (%eax), %ecx
movl %ecx, 48(%esp)
movl $8, 52(%esp)
movl $0, 60(%esp)
movl $0, 56(%esp)
movl $0, 68(%esp)
movl $0, 64(%esp)
movl $0, 76(%esp)
movl $0, 72(%esp)
movl $0, 84(%esp)
movl $0, 80(%esp)
movl $0, 92(%esp)
movl $0, 88(%esp)
movl $0, 100(%esp)
movl $0, 96(%esp)
movl $0, 108(%esp)
movl $0, 104(%esp)
movl $0, 116(%esp)
movl $0, 112(%esp)
; lowergc loop overhead
leal 44(%esp), %eax
movl %eax, 56(%esp)
leal 40(%esp), %eax
movl %eax, 64(%esp)
leal 36(%esp), %eax
movl %eax, 72(%esp)
leal 32(%esp), %eax
movl %eax, 80(%esp)
leal 28(%esp), %eax
movl %eax, 88(%esp)
leal 24(%esp), %eax
movl %eax, 96(%esp)
leal 20(%esp), %eax
movl %eax, 104(%esp)
leal 16(%esp), %eax
movl %eax, 112(%esp)
; lowergc epilogue
movl 48(%esp), %edx
movl %edx, (%ecx)
; lowergc metadata
(none)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45670
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Mon, 7 Jan 2008 01:30:38 +0000 (01:30 +0000)]
Enabling the target-independent garbage collection infrastructure by hooking it
up to the various compiler pipelines.
This doesn't actually add support for any GC algorithms, which means it
temporarily breaks a few tests. To be fixed shortly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45669
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 23:49:32 +0000 (23:49 +0000)]
The pic base can't be duplicated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45668
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 23:38:27 +0000 (23:38 +0000)]
rename isLoad -> isSimpleLoad due to evan's desire to have such a predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45667
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Sun, 6 Jan 2008 21:54:35 +0000 (21:54 +0000)]
Modify Makefile.rules to allow makefiles to prepend to C.Flags and
fiends. Change Makefile.ocaml to not touch CFLAGS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45663
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 21:04:43 +0000 (21:04 +0000)]
improve description of alignment, patch by Alain Frisch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45662
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 19:51:52 +0000 (19:51 +0000)]
Fix typo noticed by 'Danny' in PR1901
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45661
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 19:19:32 +0000 (19:19 +0000)]
back out accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45660
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 19:18:52 +0000 (19:18 +0000)]
fix an accidental commit that broke all the testers :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45659
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 6 Jan 2008 18:27:01 +0000 (18:27 +0000)]
The transform that tries to turn calls to bitcast functions into
direct calls bails out unless caller and callee have essentially
equivalent parameter attributes. This is illogical - the callee's
attributes should be of no relevance here. Rework the logic, which
incidentally fixes a crash when removed arguments have attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45658
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 6 Jan 2008 10:12:28 +0000 (10:12 +0000)]
When transforming a call to a bitcast function into
a direct call with cast parameters and cast return
value (if any), instcombine was prepared to cast any
non-void return value into any other, whether castable
or not. Add a new predicate for testing whether casting
is valid, and check it both for the return value and
(as a cleanup) for the parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45657
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 08:36:04 +0000 (08:36 +0000)]
rename isStore -> mayStore to more accurately reflect what it captures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45656
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 6 Jan 2008 07:43:13 +0000 (07:43 +0000)]
Remove an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45655
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 06:44:58 +0000 (06:44 +0000)]
Change the 'isStore' inferrer to look for 'SDNPMayStore'
instead of "ISD::STORE". This allows us to mark target-specific dag
nodes as storing (such as ppc byteswap stores). This allows us to remove
more explicit isStore flags from the .td files.
Finally, add a warning for when a .td file contains an explicit
isStore and tblgen is able to infer it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45654
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 05:55:01 +0000 (05:55 +0000)]
remove explicit isStore flags that are now inferrable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45653
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 05:53:26 +0000 (05:53 +0000)]
remove some isStore flags that are now inferred automatically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45652
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 05:43:21 +0000 (05:43 +0000)]
describe isStore and simplify the implementation of hasUnmodelledSideEffects.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45651
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 05:36:50 +0000 (05:36 +0000)]
set the 'isstore' flag for instructions whose pattern is an
intrinsic that writes to memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45650
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 6 Jan 2008 03:12:44 +0000 (03:12 +0000)]
Accept both %y, %x and %x, %y as valid answers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45649
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 02:16:26 +0000 (02:16 +0000)]
remove some old hacky code that tried to infer whether a store
occured in a pattern, but failed miserably. The new code works for
any instruction that has a store in its pattern, including all the
x86 mem op mem instructions.
The only target-independent code that uses this is branch folding,
so this won't change anything in practice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45648
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 01:53:37 +0000 (01:53 +0000)]
rearrange some code to allow inferring instr info from the pattern of the instr, but don't do so yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45647
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 01:52:22 +0000 (01:52 +0000)]
improve const correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45646
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 01:35:39 +0000 (01:35 +0000)]
Split the impl of CodeGenInstruction out to its own .cpp file, add a getName() accessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45645
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 01:21:51 +0000 (01:21 +0000)]
final cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45644
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 01:20:13 +0000 (01:20 +0000)]
further simplifications and cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45643
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 01:12:44 +0000 (01:12 +0000)]
simplify some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45642
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 01:10:31 +0000 (01:10 +0000)]
rename CodegenDAGPatterns -> CodeGenDAGPatterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45641
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Jan 2008 00:49:05 +0000 (00:49 +0000)]
split enum emission out from InstrInfoEmitter into it's own tblgen backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45640
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 23:37:52 +0000 (23:37 +0000)]
fix build on case sensitive file systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45639
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 5 Jan 2008 23:30:51 +0000 (23:30 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45638
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 23:29:51 +0000 (23:29 +0000)]
make this build with newer gcc's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45637
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 22:58:54 +0000 (22:58 +0000)]
now that computing CodegenDAGPatterns doesn't implicitly print stuff
out, DAGISelEmitter can compute it in its ctor, which simplifies some code.
Now we can use CodegenDAGPatterns in other parts of tblgen that want access
to dag pattern info, woo!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45636
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 22:54:53 +0000 (22:54 +0000)]
move Node Transformation printing from CodeGenDAGPatterns -> DAGISelEmitter.
The only difference in output is that we now print them in alphabetical
order instead of reverse alphabetical order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45635
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 22:43:57 +0000 (22:43 +0000)]
move predicate printing code from CodeGenDAGPatterns -> DAGISelEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45634
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 22:30:17 +0000 (22:30 +0000)]
fix a fixme by improving const correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45633
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 22:25:12 +0000 (22:25 +0000)]
change getQualifiedName to be a global function.
Split the pattern parsing code out from the dag isel emitter into it's own file.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45632
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sat, 5 Jan 2008 20:51:30 +0000 (20:51 +0000)]
Remove an incorrect optimization that is performed correctly by
the target independent legalizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45631
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sat, 5 Jan 2008 20:47:37 +0000 (20:47 +0000)]
If custom lowering of insert element fails, the result Val will be 0.
Don't overwrite a variable used by the fallthrough code path in this
case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45630
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 20:15:42 +0000 (20:15 +0000)]
Fix build issue on certain compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45629
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Sat, 5 Jan 2008 16:56:59 +0000 (16:56 +0000)]
Refactoring the x86 and x86-64 calling convention implementations,
unifying the copied algorithms and saving over 500 LOC. There should
be no functionality change, but please test on your favorite x86
target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45627
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 5 Jan 2008 09:18:04 +0000 (09:18 +0000)]
Chris and Evan noticed that this check was compleatly fubared. I was
checking that there was a from a global instead of a load from the stub
for a global, which is the one that's safe to hoist.
Consider this program:
volatile char G[100];
int B(char *F, int N) {
for (; N > 0; --N)
F[N] = G[N];
}
In static mode, we shouldn't be hoisting the load from G:
$ llc -relocation-model=static -o - a.bc -march=x86 -machine-licm
LBB1_1: # bb.preheader
leal -1(%eax), %edx
testl %edx, %edx
movl $1, %edx
cmovns %eax, %edx
xorl %esi, %esi
LBB1_2: # bb
movb _G(%eax), %bl
movb %bl, (%ecx,%eax)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45626
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 06:47:58 +0000 (06:47 +0000)]
The current impl is really trivial, add some comments about how it can be made better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45625
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 06:14:16 +0000 (06:14 +0000)]
allow sinking to be enabled for the jit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45624
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 06:10:42 +0000 (06:10 +0000)]
enable sinking and licm of loads from the argument area. I'd like to enable this
for remat, but can't due to an RA bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45623
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 05:28:30 +0000 (05:28 +0000)]
simplify some code by using shorter accessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45622
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 05:26:26 +0000 (05:26 +0000)]
revert my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45621
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 05:19:56 +0000 (05:19 +0000)]
factor some code better to avoid redundancy between
isReallySideEffectFree and isReallyTriviallyReMaterializable. Why is a load from
a global considered side-effect-free but not rematable?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45620
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 03:54:32 +0000 (03:54 +0000)]
getting the pic base has no side effects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45618
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 02:33:22 +0000 (02:33 +0000)]
don't sink anything with side effects, this makes lots of stuff work, but sinks almost nothing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45617
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 5 Jan 2008 02:26:58 +0000 (02:26 +0000)]
X86 JIT PIC jumptable support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45616
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 01:39:17 +0000 (01:39 +0000)]
fix a common crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45614
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 01:22:42 +0000 (01:22 +0000)]
remove a couple more unsafe xforms in the face of overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45613
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Jan 2008 01:18:20 +0000 (01:18 +0000)]
remove the (x-y) < 0 comparison xform, it miscompiles
things that are not equality comparisons, for example:
(
2147479553+4096)-
2147479553 < 0 != (
2147479553+4096) <
2147479553
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45612
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 5 Jan 2008 00:48:55 +0000 (00:48 +0000)]
I should not be allowed to commit when sleepy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45608
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 5 Jan 2008 00:43:37 +0000 (00:43 +0000)]
Didn't mean to commit this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45607
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 5 Jan 2008 00:42:45 +0000 (00:42 +0000)]
Didn't mean to commit this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45606
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 5 Jan 2008 00:41:47 +0000 (00:41 +0000)]
Combine MovePCtoStack + POP32r into one instruction MOVPC32r so it can be moved if needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45605
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 4 Jan 2008 23:57:37 +0000 (23:57 +0000)]
Move some more functionality from MRegisterInfo to TargetInstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45603
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Jan 2008 20:54:55 +0000 (20:54 +0000)]
Don't recalculate the loop info and loop dominators analyses if they're
preserved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45596
91177308-0d34-0410-b5e6-
96231b3b80d8
Wojciech Matyjewicz [Fri, 4 Jan 2008 20:04:08 +0000 (20:04 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45595
91177308-0d34-0410-b5e6-
96231b3b80d8
Wojciech Matyjewicz [Fri, 4 Jan 2008 20:02:18 +0000 (20:02 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45594
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 4 Jan 2008 17:31:56 +0000 (17:31 +0000)]
Testcase with non-integer "bitfields" (in quotes,
since they didn't actually need to be bitfields,
though they are marked as such).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45588
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Fri, 4 Jan 2008 13:21:02 +0000 (13:21 +0000)]
Fix a typo in llvm.mli noticed by Alain Frisch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45585
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 4 Jan 2008 13:15:39 +0000 (13:15 +0000)]
Testcase for PR1386.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45583
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Jan 2008 12:04:32 +0000 (12:04 +0000)]
doc_code-ify some code in this doc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45581
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Fri, 4 Jan 2008 11:55:57 +0000 (11:55 +0000)]
Quote a path in the Ocaml makefile which is likely to include spaces on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45580
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 4 Jan 2008 10:50:28 +0000 (10:50 +0000)]
Unbreak tailcall opt in JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45576
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 4 Jan 2008 10:46:51 +0000 (10:46 +0000)]
X86 PIC JIT support fixes: encoding bugs, add lazy pointer stubs support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45575
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Jan 2008 08:59:18 +0000 (08:59 +0000)]
80-column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45574
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Jan 2008 08:48:49 +0000 (08:48 +0000)]
Add that this preserves some analyses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45573
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Jan 2008 08:11:03 +0000 (08:11 +0000)]
Move option to enable machine LICM into LLVMTargetMachine.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45572
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Jan 2008 07:50:05 +0000 (07:50 +0000)]
Call the parent's getAnalysisUsage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45571
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 07:36:53 +0000 (07:36 +0000)]
Add a really quick hack at a machine code sinking pass, enabled with --enable-sinking.
It is missing validity checks, so it is known broken. However, it is powerful enough
to compile this contrived code:
void test1(int C, double A, double B, double *P) {
double Tmp = A*A+B*B;
*P = C ? Tmp : A;
}
into:
_test1:
movsd 8(%esp), %xmm0
cmpl $0, 4(%esp)
je LBB1_2 # entry
LBB1_1: # entry
movsd 16(%esp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
LBB1_2: # entry
movl 24(%esp), %eax
movsd %xmm0, (%eax)
ret
instead of:
_test1:
movsd 16(%esp), %xmm0
mulsd %xmm0, %xmm0
movsd 8(%esp), %xmm1
movapd %xmm1, %xmm2
mulsd %xmm2, %xmm2
addsd %xmm0, %xmm2
cmpl $0, 4(%esp)
je LBB1_2 # entry
LBB1_1: # entry
movapd %xmm2, %xmm1
LBB1_2: # entry
movl 24(%esp), %eax
movsd %xmm1, (%eax)
ret
woo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45570
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 06:41:45 +0000 (06:41 +0000)]
remove dead #includes and reorder the rest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45569
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 05:04:53 +0000 (05:04 +0000)]
Fix PR1896
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45568
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 04:38:35 +0000 (04:38 +0000)]
Change the builtin matcher to emit a decision tree, which should help out
the VC++ 'nesting depth' issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45567
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 04:34:14 +0000 (04:34 +0000)]
fix nesting issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45566
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 04:33:49 +0000 (04:33 +0000)]
fix validation issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45565
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 04:32:38 +0000 (04:32 +0000)]
improve the description of types, patch by Alain Frisch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45564
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Jan 2008 03:32:52 +0000 (03:32 +0000)]
Don't let IntrinsicID be uninitialized if it doesn't match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45563
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 4 Jan 2008 02:22:21 +0000 (02:22 +0000)]
Correct order of parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45562
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 3 Jan 2008 23:02:16 +0000 (23:02 +0000)]
Remove the default else. This was ending in code that looked like this:
if (!strcmp(Target, "x86")) {
// ...
}
else
IntrinsicID = Intrinsic::not_intrinsic;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45557
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Jan 2008 22:15:32 +0000 (22:15 +0000)]
Remove symbols that don't exist, remove tabs, fix comment typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45553
91177308-0d34-0410-b5e6-
96231b3b80d8
Chuck Rose III [Thu, 3 Jan 2008 19:53:03 +0000 (19:53 +0000)]
Adding new files to win32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45545
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Thu, 3 Jan 2008 17:42:08 +0000 (17:42 +0000)]
Ignoring output files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45538
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Jan 2008 16:56:04 +0000 (16:56 +0000)]
add info on walking preds/succs of a block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45537
91177308-0d34-0410-b5e6-
96231b3b80d8