oota-llvm.git
14 years agoModify Makefile.rules to allow makefiles to prepend to C.Flags and
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

14 years agoimprove description of alignment, patch by Alain Frisch.
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

14 years agoFix typo noticed by 'Danny' in PR1901
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

14 years agoback out accidental commit.
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

14 years agofix an accidental commit that broke all the testers :(
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

14 years agoThe transform that tries to turn calls to bitcast functions into
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

14 years agoWhen transforming a call to a bitcast function into
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

14 years agorename isStore -> mayStore to more accurately reflect what it captures.
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

14 years agoRemove an unused variable.
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

14 years agoChange the 'isStore' inferrer to look for 'SDNPMayStore'
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

14 years agoremove explicit isStore flags that are now inferrable.
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

14 years agoremove some isStore flags that are now inferred automatically.
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

14 years agodescribe isStore and simplify the implementation of hasUnmodelledSideEffects.
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

14 years agoset the 'isstore' flag for instructions whose pattern is an
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

14 years agoAccept both %y, %x and %x, %y as valid answers.
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

14 years agoremove some old hacky code that tried to infer whether a store
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

14 years agorearrange some code to allow inferring instr info from the pattern of the instr,...
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

14 years agoimprove const correctness.
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

14 years agoSplit the impl of CodeGenInstruction out to its own .cpp file, add a getName() accessor.
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

14 years agofinal cleanups.
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

14 years agofurther simplifications and cleanup
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

14 years agosimplify some code
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

14 years agorename CodegenDAGPatterns -> CodeGenDAGPatterns
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

14 years agosplit enum emission out from InstrInfoEmitter into it's own tblgen backend.
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

14 years agofix build on case sensitive file systems.
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

14 years agoFix comment.
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

14 years agomake this build with newer gcc's
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

14 years agonow that computing CodegenDAGPatterns doesn't implicitly print stuff
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

14 years agomove Node Transformation printing from CodeGenDAGPatterns -> DAGISelEmitter.
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

14 years agomove predicate printing code from CodeGenDAGPatterns -> DAGISelEmitter.
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

14 years agofix a fixme by improving const correctness.
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

14 years agochange getQualifiedName to be a global function.
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

14 years agoRemove an incorrect optimization that is performed correctly by
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

14 years agoIf custom lowering of insert element fails, the result Val will be 0.
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

14 years agoFix build issue on certain compilers.
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

14 years agoRefactoring the x86 and x86-64 calling convention implementations,
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

14 years agoChris and Evan noticed that this check was compleatly fubared. I was
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

14 years agoThe current impl is really trivial, add some comments about how it can be made better.
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

14 years agoallow sinking to be enabled for the jit
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

14 years agoenable sinking and licm of loads from the argument area. I'd like to enable this
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

14 years agosimplify some code by using shorter accessors.
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

14 years agorevert my previous patch.
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

14 years agofactor some code better to avoid redundancy between
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

14 years agogetting the pic base has no side effects.
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

14 years agodon't sink anything with side effects, this makes lots of stuff work, but sinks almos...
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

14 years agoX86 JIT PIC jumptable support.
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

14 years agofix a common crash.
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

14 years agoremove a couple more unsafe xforms in the face of overflow.
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

14 years agoremove the (x-y) < 0 comparison xform, it miscompiles
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

14 years agoI should not be allowed to commit when sleepy.
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

14 years agoDidn't mean to commit this.
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

14 years agoDidn't mean to commit this.
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

14 years agoCombine MovePCtoStack + POP32r into one instruction MOVPC32r so it can be moved if...
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

14 years agoMove some more functionality from MRegisterInfo to TargetInstrInfo.
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

14 years agoDon't recalculate the loop info and loop dominators analyses if they're
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

14 years agofix typo
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

14 years agofix typo
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

14 years agoTestcase with non-integer "bitfields" (in quotes,
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

14 years agoFix a typo in llvm.mli noticed by Alain Frisch.
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

14 years agoTestcase for PR1386.
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

14 years agodoc_code-ify some code in this doc.
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

14 years agoQuote a path in the Ocaml makefile which is likely to include spaces on Windows.
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

14 years agoUnbreak tailcall opt in JIT.
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

14 years agoX86 PIC JIT support fixes: encoding bugs, add lazy pointer stubs support.
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

14 years ago80-column violations.
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

14 years agoAdd that this preserves some analyses.
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

14 years agoMove option to enable machine LICM into LLVMTargetMachine.cpp.
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

14 years agoCall the parent's getAnalysisUsage.
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

14 years agoAdd a really quick hack at a machine code sinking pass, enabled with --enable-sinking.
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

14 years agoremove dead #includes and reorder the rest.
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

14 years agoFix PR1896
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

14 years agoChange the builtin matcher to emit a decision tree, which should help out
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

14 years agofix nesting issues.
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

14 years agofix validation issues.
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

14 years agoimprove the description of types, patch by Alain Frisch
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

14 years agoDon't let IntrinsicID be uninitialized if it doesn't match.
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

14 years agoCorrect order of parameters.
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

14 years agoRemove the default else. This was ending in code that looked like this:
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

14 years agoRemove symbols that don't exist, remove tabs, fix comment typo
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

14 years agoAdding new files to win32 build
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

14 years agoIgnoring output files.
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

14 years agoadd info on walking preds/succs of a block.
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

14 years agoFirst steps in in X86 calling convention cleanup.
Gordon Henriksen [Thu, 3 Jan 2008 16:47:34 +0000 (16:47 +0000)]
First steps in in X86 calling convention cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45536 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest for handling of large bit offset from a
Duncan Sands [Thu, 3 Jan 2008 11:53:52 +0000 (11:53 +0000)]
Test for handling of large bit offset from a
variable field offset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45534 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodon't hoist FP additions into unconditional adds + selects. This
Chris Lattner [Thu, 3 Jan 2008 07:25:26 +0000 (07:25 +0000)]
don't hoist FP additions into unconditional adds + selects.  This
could theoretically introduce a trap, but is also a performance issue.
This speeds up ptrdist/ks by 8%.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45533 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR1873, a problem finding stat-related symbols on linux, due to
Chris Lattner [Thu, 3 Jan 2008 07:10:51 +0000 (07:10 +0000)]
Fix PR1873, a problem finding stat-related symbols on linux, due to
"libc_nonshared.a". Patch by Edwin Török!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45532 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTrying that again.
Gordon Henriksen [Thu, 3 Jan 2008 03:32:33 +0000 (03:32 +0000)]
Trying that again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45529 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a compile error on Windows.
Gordon Henriksen [Thu, 3 Jan 2008 03:21:18 +0000 (03:21 +0000)]
Fix a compile error on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45528 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange MachineRelocation::DoesntNeedFnStub to NeedStub. This fields will be used
Evan Cheng [Thu, 3 Jan 2008 02:56:28 +0000 (02:56 +0000)]
Change MachineRelocation::DoesntNeedFnStub to NeedStub. This fields will be used
for non-function GV relocations that require function address stubs (e.g. Mac OS X in non-static mode).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45527 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodon't access element zero of an array of size zero.
Chris Lattner [Thu, 3 Jan 2008 01:25:31 +0000 (01:25 +0000)]
don't access element zero of an array of size zero.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45526 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove the function attr cache for intrinsics. This does not maintain the
Chris Lattner [Thu, 3 Jan 2008 01:20:12 +0000 (01:20 +0000)]
Remove the function attr cache for intrinsics.  This does not maintain the
refcount on these correctly, and can end up referring to deleted
attributes.  This fixes PR1881.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45525 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't create a new ParamAttrsList (which copies the vector) just to
Chris Lattner [Thu, 3 Jan 2008 00:29:27 +0000 (00:29 +0000)]
Don't create a new ParamAttrsList (which copies the vector) just to
get a profile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45524 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAn example for which the TYPE_SIZE was being set from
Duncan Sands [Thu, 3 Jan 2008 00:26:42 +0000 (00:26 +0000)]
An example for which the TYPE_SIZE was being set from
the initial value, while the type fields were not (this
is a qualified union type, so not all fields are always
present).  This resulted in the size of the corresponding
LLVM type being larger than the gcc TYPE_SIZE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45522 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest handling of records for which the fields are
Duncan Sands [Thu, 3 Jan 2008 00:17:02 +0000 (00:17 +0000)]
Test handling of records for which the fields are
not ordered by offset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45520 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomove some code out of line, rearrange a bit.
Chris Lattner [Thu, 3 Jan 2008 00:10:22 +0000 (00:10 +0000)]
move some code out of line, rearrange a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45519 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDisallow copying explicitly.
Chris Lattner [Thu, 3 Jan 2008 00:09:47 +0000 (00:09 +0000)]
Disallow copying explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45518 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSplit param attr implementation out from Function.cpp into its
Chris Lattner [Wed, 2 Jan 2008 23:42:30 +0000 (23:42 +0000)]
Split param attr implementation out from Function.cpp into its
own file.  Don't #include ParameterAttributes.h into any major
public header files: just move methods out of line as appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45517 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd missing #include
Chris Lattner [Wed, 2 Jan 2008 23:41:05 +0000 (23:41 +0000)]
add missing #include

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45516 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoX86 PIC JIT bug fix: relocations for constantpool and jumptable.
Evan Cheng [Wed, 2 Jan 2008 23:38:59 +0000 (23:38 +0000)]
X86 PIC JIT bug fix: relocations for constantpool and jumptable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45515 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove blob of #if'd out code.
Chris Lattner [Wed, 2 Jan 2008 23:10:45 +0000 (23:10 +0000)]
remove blob of #if'd out code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45512 91177308-0d34-0410-b5e6-96231b3b80d8