oota-llvm.git
16 years agoProvide convenient way to disable CFI stuff for old/broken assemblers.
Anton Korobeynikov [Mon, 10 Dec 2007 23:04:38 +0000 (23:04 +0000)]
Provide convenient way to disable CFI stuff for old/broken assemblers.
Use it for Darwin.

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

16 years agoFix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
Chris Lattner [Mon, 10 Dec 2007 22:53:04 +0000 (22:53 +0000)]
Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
Reimplement the xform in Analysis/ConstantFolding.cpp where we can use
targetdata to validate that it is safe.  While I'm in there, fix some const
correctness issues and generalize the interface to the "operand folder".

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

16 years agoAdded two bounds checks to the BitVector class to detect
Ted Kremenek [Mon, 10 Dec 2007 22:28:35 +0000 (22:28 +0000)]
Added two bounds checks to the BitVector class to detect
out-of-bounds bit accesses.  The checks are only performed
in a Debug build.

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

16 years agosplit isBinaryOp into a static and member version.
Chris Lattner [Mon, 10 Dec 2007 22:18:53 +0000 (22:18 +0000)]
split isBinaryOp into a static and member version.

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

16 years agoFix some wording.
John Criswell [Mon, 10 Dec 2007 20:26:29 +0000 (20:26 +0000)]
Fix some wording.

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

16 years agoAdd StringPool + new CodeGen files to win32 build
Chuck Rose III [Mon, 10 Dec 2007 19:31:09 +0000 (19:31 +0000)]
Add StringPool + new CodeGen files to win32 build

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

16 years agoDisable cfi directives for now, darwin does't support them.
Chris Lattner [Mon, 10 Dec 2007 19:10:18 +0000 (19:10 +0000)]
Disable cfi directives for now, darwin does't support them.
These should probably be something like:

  CFI(".cfi_def_cfa_offset 16\n")

where CFI is defined to a noop on darwin and other platforms
that don't support those directives.

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

16 years agoMake PruneEH update the nounwind/noreturn attributes
Duncan Sands [Mon, 10 Dec 2007 19:09:40 +0000 (19:09 +0000)]
Make PruneEH update the nounwind/noreturn attributes
on functions as it calculates them.

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

16 years agoFix PR1836: in the interpreter, read and write apints
Duncan Sands [Mon, 10 Dec 2007 17:43:13 +0000 (17:43 +0000)]
Fix PR1836: in the interpreter, read and write apints
using the minimum possible number of bytes.  For little
endian targets run on little endian machines, apints are
stored in memory from LSB to MSB as before.  For big endian
targets on big endian machines they are stored from MSB to
LSB which wasn't always the case before (if the target and
host endianness doesn't match values are stored according
to the host's endianness).  Doing this requires knowing the
endianness of the host, which is determined when configuring -
thanks go to Anton for this.  Only having access to little
endian machines I was unable to properly test the big endian
part, which is also the most complicated...

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

16 years agoAnd finally annotate X86-64 version of callback.
Anton Korobeynikov [Mon, 10 Dec 2007 15:27:07 +0000 (15:27 +0000)]
And finally annotate X86-64 version of callback.
All bad stuff from SSE version is implicitely inherited :)

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

16 years agoProvide annotation for SSE version of callback. It's even more
Anton Korobeynikov [Mon, 10 Dec 2007 15:13:55 +0000 (15:13 +0000)]
Provide annotation for SSE version of callback. It's even more
broken, because doesn't mark xmm regs properly

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

16 years agoAnnotate JIT callback function with call frame infromation.
Anton Korobeynikov [Mon, 10 Dec 2007 14:54:42 +0000 (14:54 +0000)]
Annotate JIT callback function with call frame infromation.
This will allow us (theoretically) to unwind through JITer.
The code wasn't verified, so I'm pretty sure offsets are wrong :)

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

16 years agoIt looks like this has been broken for some time -
Duncan Sands [Mon, 10 Dec 2007 14:43:10 +0000 (14:43 +0000)]
It looks like this has been broken for some time -
get it to compile.

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

16 years agoA little more progress on StrongPHIElimination, now that I have a better sense of
Owen Anderson [Mon, 10 Dec 2007 08:07:09 +0000 (08:07 +0000)]
A little more progress on StrongPHIElimination, now that I have a better sense of
how the CodeGen machinery works.

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

16 years agoImprove branch folding by recgonizing that explict successor relationships impact...
Christopher Lamb [Mon, 10 Dec 2007 07:24:06 +0000 (07:24 +0000)]
Improve branch folding by recgonizing that explict successor relationships impact the value of fall-through choices.

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

16 years agoDelete the CollectorNamePool if it should become empty.
Gordon Henriksen [Mon, 10 Dec 2007 03:35:18 +0000 (03:35 +0000)]
Delete the CollectorNamePool if it should become empty.

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

16 years agoFix a typo spotted by Nick Lewycky.
Gordon Henriksen [Mon, 10 Dec 2007 03:30:21 +0000 (03:30 +0000)]
Fix a typo spotted by Nick Lewycky.

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

16 years agoAdding a collector name attribute to Function in the IR. These
Gordon Henriksen [Mon, 10 Dec 2007 03:18:06 +0000 (03:18 +0000)]
Adding a collector name attribute to Function in the IR. These
methods are new to Function:

  bool hasCollector() const;
  const std::string &getCollector() const;
  void setCollector(const std::string &);
  void clearCollector();

The assembly representation is as such:

  define void @f() gc "shadow-stack" { ...

The implementation uses an on-the-side table to map Functions to
collector names, such that there is no overhead. A StringPool is
further used to unique collector names, which are extremely
likely to be unique per process.

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

16 years agoReverting dtor devirtualization patch.
Gordon Henriksen [Mon, 10 Dec 2007 02:14:30 +0000 (02:14 +0000)]
Reverting dtor devirtualization patch.
_sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed
_sabre_: the vtable lives to fight another day

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

16 years agoremove some dead code.
Chris Lattner [Mon, 10 Dec 2007 01:51:38 +0000 (01:51 +0000)]
remove some dead code.

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

16 years agofix some warnings.
Chris Lattner [Mon, 10 Dec 2007 01:51:22 +0000 (01:51 +0000)]
fix some warnings.

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

16 years agoFix a big problem in the recent dtor refactoring work, now it passes 2007-11-19-Inlin...
Chris Lattner [Mon, 10 Dec 2007 01:48:29 +0000 (01:48 +0000)]
Fix a big problem in the recent dtor refactoring work, now it passes 2007-11-19-InlineAsm.ll

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

16 years agoDevirtualizing Value destructor (PR889). Patch by Pawel Kunio!
Gordon Henriksen [Sun, 9 Dec 2007 22:46:10 +0000 (22:46 +0000)]
Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!

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

16 years agoDuncan points out that the subtraction is unneeded since hte code
Chris Lattner [Sun, 9 Dec 2007 17:56:34 +0000 (17:56 +0000)]
Duncan points out that the subtraction is unneeded since hte code
knows the vector is not pow2

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

16 years agoUpgrading this test to 2.0 .ll syntax.
Gordon Henriksen [Sun, 9 Dec 2007 15:03:01 +0000 (15:03 +0000)]
Upgrading this test to 2.0 .ll syntax.

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

16 years agoFix PR1782, patch by Wojtek Matyjewicz!
Chris Lattner [Sun, 9 Dec 2007 07:35:13 +0000 (07:35 +0000)]
Fix PR1782, patch by Wojtek Matyjewicz!

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

16 years agoFix a very silly typo.
Gordon Henriksen [Sun, 9 Dec 2007 01:12:08 +0000 (01:12 +0000)]
Fix a very silly typo.

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

16 years agoFix accidental commit by Bill.
Chris Lattner [Sun, 9 Dec 2007 00:27:38 +0000 (00:27 +0000)]
Fix accidental commit by Bill.

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

16 years agoAdd support for splitting the operand of a return instruction.
Chris Lattner [Sun, 9 Dec 2007 00:06:19 +0000 (00:06 +0000)]
Add support for splitting the operand of a return instruction.

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

16 years agoReverting 44702. It wasn't correct to rename them.
Bill Wendling [Sat, 8 Dec 2007 23:58:46 +0000 (23:58 +0000)]
Reverting 44702. It wasn't correct to rename them.

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

16 years agoadd many new cases to SplitResult. SplitResult now handles all the cases that Legali...
Chris Lattner [Sat, 8 Dec 2007 23:58:27 +0000 (23:58 +0000)]
add many new cases to SplitResult.  SplitResult now handles all the cases that LegalizeDAG does.

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

16 years agoImplement splitting support for store, allowing us to compile:
Chris Lattner [Sat, 8 Dec 2007 23:24:26 +0000 (23:24 +0000)]
Implement splitting support for store, allowing us to compile:

%f8 = type <8 x float>

define void @test_f8(%f8* %P, %f8* %Q, %f8* %S) {
%p = load %f8* %P ; <%f8> [#uses=1]
%q = load %f8* %Q ; <%f8> [#uses=1]
%R = add %f8 %p, %q ; <%f8> [#uses=1]
store %f8 %R, %f8* %S
ret void
}

into:

_test_f8:
movaps 16(%rdi), %xmm0
addps 16(%rsi), %xmm0
movaps (%rdi), %xmm1
addps (%rsi), %xmm1
movaps %xmm0, 16(%rdx)
movaps %xmm1, (%rdx)
ret

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

16 years agoimplement vector splitting of load, undef, and binops.
Chris Lattner [Sat, 8 Dec 2007 23:08:49 +0000 (23:08 +0000)]
implement vector splitting of load, undef, and binops.

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

16 years agoimplement some methods.
Chris Lattner [Sat, 8 Dec 2007 22:40:18 +0000 (22:40 +0000)]
implement some methods.

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

16 years agoadd scaffolding for splitting of vectors.
Chris Lattner [Sat, 8 Dec 2007 22:37:41 +0000 (22:37 +0000)]
add scaffolding for splitting of vectors.

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

16 years agoProject cleanups
Nate Begeman [Sat, 8 Dec 2007 22:29:19 +0000 (22:29 +0000)]
Project cleanups

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

16 years agoRemove dead file and directory.
Chris Lattner [Sat, 8 Dec 2007 22:17:33 +0000 (22:17 +0000)]
Remove dead file and directory.

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

16 years agoreorganize header to separate into functional blocks.
Chris Lattner [Sat, 8 Dec 2007 21:59:32 +0000 (21:59 +0000)]
reorganize header to separate into functional blocks.

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

16 years agosplit scalarization out to its own file.
Chris Lattner [Sat, 8 Dec 2007 20:30:28 +0000 (20:30 +0000)]
split scalarization out to its own file.

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

16 years agoSplit expansion out into its own file.
Chris Lattner [Sat, 8 Dec 2007 20:27:32 +0000 (20:27 +0000)]
Split expansion out into its own file.

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

16 years agoSplit promotion support out to its own file.
Chris Lattner [Sat, 8 Dec 2007 20:24:38 +0000 (20:24 +0000)]
Split promotion support out to its own file.

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

16 years agoRename LegalizeDAGTypes.cpp -> LegalizeTypes.cpp
Chris Lattner [Sat, 8 Dec 2007 20:17:13 +0000 (20:17 +0000)]
Rename LegalizeDAGTypes.cpp -> LegalizeTypes.cpp

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

16 years agoSplit the class definition of DAGTypeLegalizer out into a header.
Chris Lattner [Sat, 8 Dec 2007 20:16:06 +0000 (20:16 +0000)]
Split the class definition of DAGTypeLegalizer out into a header.
Leave it visibility hidden, but not in an anon namespace.

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

16 years agoIncorporating review feedback from Reid.
Gordon Henriksen [Sat, 8 Dec 2007 20:10:40 +0000 (20:10 +0000)]
Incorporating review feedback from Reid.

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

16 years agoremove dead #include.
Chris Lattner [Sat, 8 Dec 2007 19:06:21 +0000 (19:06 +0000)]
remove dead #include.

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

16 years agoadd #include
Chris Lattner [Sat, 8 Dec 2007 19:03:30 +0000 (19:03 +0000)]
add #include

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

16 years agoeliminate dependency on Bitcode headers.
Chris Lattner [Sat, 8 Dec 2007 19:01:44 +0000 (19:01 +0000)]
eliminate dependency on Bitcode headers.

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

16 years agoremove dead #include, APInt.h already has the needed forward decls.
Chris Lattner [Sat, 8 Dec 2007 19:00:38 +0000 (19:00 +0000)]
remove dead #include, APInt.h already has the needed forward decls.

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

16 years agoproper #include order.
Chris Lattner [Sat, 8 Dec 2007 19:00:03 +0000 (19:00 +0000)]
proper #include order.

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

16 years agoIgnoring generated files.
Gordon Henriksen [Sat, 8 Dec 2007 17:53:01 +0000 (17:53 +0000)]
Ignoring generated files.

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

16 years agoAdding a StringPool data structure, which GC will use.
Gordon Henriksen [Sat, 8 Dec 2007 17:07:47 +0000 (17:07 +0000)]
Adding a StringPool data structure, which GC will use.

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

16 years agoFix bug in constructing Ocaml option types in the bindings.
Gordon Henriksen [Sat, 8 Dec 2007 16:55:43 +0000 (16:55 +0000)]
Fix bug in constructing Ocaml option types in the bindings.

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

16 years agoaesthetic changes, no functionality change. Evan, it's not clear
Chris Lattner [Sat, 8 Dec 2007 07:22:58 +0000 (07:22 +0000)]
aesthetic changes, no functionality change.  Evan, it's not clear
what 'Available' is, please add a comment near it and rename it
if appropriate.

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

16 years agoRenaming:
Bill Wendling [Sat, 8 Dec 2007 07:17:56 +0000 (07:17 +0000)]
Renaming:

  isTriviallyReMaterializable -> hasNoSideEffects
  isReallyTriviallyReMaterializable -> isTriviallyReMaterializable

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

16 years agoFix a significant code quality regression I introduced on PPC64 quite
Chris Lattner [Sat, 8 Dec 2007 07:04:58 +0000 (07:04 +0000)]
Fix a significant code quality regression I introduced on PPC64 quite
a while ago.  We now produce:

_foo:
mflr r0
std r0, 16(r1)
ld r2, 16(r1)
std r2, 0(r3)
ld r0, 16(r1)
mtlr r0
blr

instead of:

_foo:
mflr r0
std r0, 16(r1)
lis r0, 0
ori r0, r0, 16
ldx r2, r1, r0
std r2, 0(r3)
ld r0, 16(r1)
mtlr r0
blr

for:

void foo(void **X) {
  *X = __builtin_return_address(0);
}

on ppc64.

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

16 years agoimplement __builtin_return_addr(0) on ppc.
Chris Lattner [Sat, 8 Dec 2007 06:59:59 +0000 (06:59 +0000)]
implement __builtin_return_addr(0) on ppc.

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

16 years agorefactor some code to avoid overloading the name 'usesLR' in
Chris Lattner [Sat, 8 Dec 2007 06:39:11 +0000 (06:39 +0000)]
refactor some code to avoid overloading the name 'usesLR' in
different places to mean different things.  Document what the
one in PPCFunctionInfo means and when it is valid.

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

16 years agoImplement correct isa<UnaryInstruction>, problem reported by "ST".
Chris Lattner [Sat, 8 Dec 2007 04:37:52 +0000 (04:37 +0000)]
Implement correct isa<UnaryInstruction>, problem reported by "ST".

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

16 years agoIncorporated comments from Evan and Chris:
Bill Wendling [Sat, 8 Dec 2007 01:47:01 +0000 (01:47 +0000)]
Incorporated comments from Evan and Chris:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056043.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056048.html

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

16 years agoFix several cache coherence bugs in MemDep/GVN that were found. Also add some (disab...
Owen Anderson [Sat, 8 Dec 2007 01:37:09 +0000 (01:37 +0000)]
Fix several cache coherence bugs in MemDep/GVN that were found.  Also add some (disabled) debugging code
to make such problems easier to diagnose in the future, written by Duncan Sands.

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

16 years agoDoh
Evan Cheng [Sat, 8 Dec 2007 01:01:07 +0000 (01:01 +0000)]
Doh

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

16 years agoFix a compilation warning.
Evan Cheng [Sat, 8 Dec 2007 01:00:31 +0000 (01:00 +0000)]
Fix a compilation warning.

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

16 years agoFix a compilation warning.
Evan Cheng [Sat, 8 Dec 2007 01:00:21 +0000 (01:00 +0000)]
Fix a compilation warning.

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

16 years agoAdding MachineLoopInfo.h,.cpp and MachineLICP.cpp to VStudio build
Chuck Rose III [Sat, 8 Dec 2007 00:53:13 +0000 (00:53 +0000)]
Adding MachineLoopInfo.h,.cpp and MachineLICP.cpp to VStudio build

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

16 years agoInitial commit of the machine code LICM pass. It successfully hoists this:
Bill Wendling [Fri, 7 Dec 2007 21:42:31 +0000 (21:42 +0000)]
Initial commit of the machine code LICM pass. It successfully hoists this:

_foo:
        li r2, 0
LBB1_1: ; bb
        li r5, 0
        stw r5, 0(r3)
        addi r2, r2, 1
        addi r3, r3, 4
        cmplw cr0, r2, r4
        bne cr0, LBB1_1 ; bb
LBB1_2: ; return
        blr

to:

_foo:
        li r2, 0
        li r5, 0
LBB1_1: ; bb
        stw r5, 0(r3)
        addi r2, r2, 1
        addi r3, r3, 4
        cmplw cr0, r2, r4
        bne cr0, LBB1_1 ; bb
LBB1_2: ; return
        blr

ZOMG!! :-)

Moar to come...

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

16 years agoAdd comment.
Evan Cheng [Fri, 7 Dec 2007 21:30:01 +0000 (21:30 +0000)]
Add comment.

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

16 years agoMuch improved v8i16 shuffles. (Step 1).
Evan Cheng [Fri, 7 Dec 2007 08:07:39 +0000 (08:07 +0000)]
Much improved v8i16 shuffles. (Step 1).

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

16 years agoFix a stupid error that Chris pointed out.
Owen Anderson [Fri, 7 Dec 2007 04:04:55 +0000 (04:04 +0000)]
Fix a stupid error that Chris pointed out.

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

16 years agoNew test case.
Evan Cheng [Fri, 7 Dec 2007 01:48:46 +0000 (01:48 +0000)]
New test case.

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

16 years agoAdd an option to control this heuristic tweak so I can test it.
Evan Cheng [Fri, 7 Dec 2007 00:28:32 +0000 (00:28 +0000)]
Add an option to control this heuristic tweak so I can test it.

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

16 years agoRemove a bogus optimization. It's not possible to do a move to low element to a ...
Evan Cheng [Thu, 6 Dec 2007 22:14:22 +0000 (22:14 +0000)]
Remove a bogus optimization. It's not possible to do a move to low element to a <8 x i16> or <16 x i8> vector.

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

16 years agoFix a bogus test case.
Evan Cheng [Thu, 6 Dec 2007 22:12:45 +0000 (22:12 +0000)]
Fix a bogus test case.

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

16 years agoRedo previous patch so optimization only done for i1.
Dale Johannesen [Thu, 6 Dec 2007 17:53:31 +0000 (17:53 +0000)]
Redo previous patch so optimization only done for i1.
Simpler and safer.

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

16 years agoTurning simple splitting on. Start testing new coalescer heuristics as new llcbeta.
Evan Cheng [Thu, 6 Dec 2007 08:54:31 +0000 (08:54 +0000)]
Turning simple splitting on. Start testing new coalescer heuristics as new llcbeta.

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

16 years agothird time around: instead of disabling this completely,
Chris Lattner [Thu, 6 Dec 2007 07:47:55 +0000 (07:47 +0000)]
third time around: instead of disabling this completely,
only disable it if we don't know it will be obviously profitable.
Still fixme, but less so. :)

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

16 years agoActually, disable this code for now. More analysis and improvements to
Chris Lattner [Thu, 6 Dec 2007 07:44:31 +0000 (07:44 +0000)]
Actually, disable this code for now.  More analysis and improvements to
the X86 backend are needed before this should be enabled by default.

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

16 years agoimplement a readme entry, compiling the code into:
Chris Lattner [Thu, 6 Dec 2007 07:33:36 +0000 (07:33 +0000)]
implement a readme entry, compiling the code into:

_foo:
movl $12, %eax
andl 4(%esp), %eax
movl _array(%eax), %eax
ret

instead of:

_foo:
movl 4(%esp), %eax
shrl $2, %eax
andl $3, %eax
movl _array(,%eax,4), %eax
ret

As it turns out, this triggers all the time, in a wide variety of
situations, for example, I see diffs like this in various programs:

-       movl    8(%eax), %eax
-       shll    $2, %eax
-       andl    $1020, %eax
-       movl    (%esi,%eax), %eax
+       movzbl  8(%eax), %eax
+       movl    (%esi,%eax,4), %eax

-       shll    $2, %edx
-       andl    $1020, %edx
-       movl    (%edi,%edx), %edx
+       andl    $255, %edx
+       movl    (%edi,%edx,4), %edx

Unfortunately, I also see stuff like this, which can be fixed in the
X86 backend:

-       andl    $85, %ebx
-       addl    _bit_count(,%ebx,4), %ebp
+       shll    $2, %ebx
+       andl    $340, %ebx
+       addl    _bit_count(%ebx), %ebp

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

16 years agosimplify some code.
Chris Lattner [Thu, 6 Dec 2007 06:25:04 +0000 (06:25 +0000)]
simplify some code.

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

16 years agoimplement the rest of the functionality from SelectionDAGLegalize::ScalarizeVectorOp
Chris Lattner [Thu, 6 Dec 2007 05:53:43 +0000 (05:53 +0000)]
implement the rest of the functionality from SelectionDAGLegalize::ScalarizeVectorOp

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

16 years agoAdjust VStudio files to add JITMemoryManager files + include <cassert> from same.
Chuck Rose III [Thu, 6 Dec 2007 02:03:01 +0000 (02:03 +0000)]
Adjust VStudio files to add JITMemoryManager files + include <cassert> from same.

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

16 years agomove some ashr-specific code out of commonShiftTransforms into visitAShr.
Chris Lattner [Thu, 6 Dec 2007 01:59:46 +0000 (01:59 +0000)]
move some ashr-specific code out of commonShiftTransforms into visitAShr.

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

16 years agoFix PR1842.
Dale Johannesen [Thu, 6 Dec 2007 01:43:46 +0000 (01:43 +0000)]
Fix PR1842.

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

16 years agoadd a new ExecutionEngine::createJIT which can be used if you only want
Chris Lattner [Thu, 6 Dec 2007 01:34:04 +0000 (01:34 +0000)]
add a new ExecutionEngine::createJIT which can be used if you only want
to create a JIT.  This lets you specify JIT-specific configuration items
like the JITMemoryManager to use.

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

16 years agosimplify creation of the interpreter, make ExecutionEngine ctor protected,
Chris Lattner [Thu, 6 Dec 2007 01:08:09 +0000 (01:08 +0000)]
simplify creation of the interpreter, make ExecutionEngine ctor protected,
delete one ExecutionEngine ctor, minor cleanup.

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

16 years agofix this when run on non x86 hosts.
Chris Lattner [Thu, 6 Dec 2007 01:05:52 +0000 (01:05 +0000)]
fix this when run on non x86 hosts.

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

16 years agoFix for PR1831: if all defs of an interval are re-materializable, then it's a preferr...
Evan Cheng [Thu, 6 Dec 2007 00:01:56 +0000 (00:01 +0000)]
Fix for PR1831: if all defs of an interval are re-materializable, then it's a preferred spill candiate.

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

16 years agoIf both result of the {s|z}xt and its source are live out, rewrite all uses of the...
Evan Cheng [Wed, 5 Dec 2007 23:58:20 +0000 (23:58 +0000)]
If both result of the {s|z}xt and its source are live out, rewrite all uses of the source with result of extension.

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

16 years agoimprove header guard
Chris Lattner [Wed, 5 Dec 2007 23:45:41 +0000 (23:45 +0000)]
improve header guard

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

16 years agosplit the JIT memory management code out from the main JIT logic into its
Chris Lattner [Wed, 5 Dec 2007 23:39:57 +0000 (23:39 +0000)]
split the JIT memory management code out from the main JIT logic into its
own JITMemoryManager interface.  There is no functionality change with
this patch.

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

16 years agoadd a note
Chris Lattner [Wed, 5 Dec 2007 23:05:06 +0000 (23:05 +0000)]
add a note

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

16 years agoadd a note
Chris Lattner [Wed, 5 Dec 2007 22:58:19 +0000 (22:58 +0000)]
add a note

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

16 years agoAlphabetizing; I want to be the last in the file!!!! ;-)
Bill Wendling [Wed, 5 Dec 2007 21:26:54 +0000 (21:26 +0000)]
Alphabetizing; I want to be the last in the file!!!! ;-)

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

16 years agoRegenerated configure after autoconf/configure.ac change.
Scott Michel [Wed, 5 Dec 2007 21:24:02 +0000 (21:24 +0000)]
Regenerated configure after autoconf/configure.ac change.

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

16 years agoMinor updates:
Scott Michel [Wed, 5 Dec 2007 21:23:16 +0000 (21:23 +0000)]
Minor updates:
- Fix typo in SPUCallingConv.td
- Credit myself for CellSPU work
- Add CellSPU to 'all' host target list

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

16 years agoCommit 44487 broke bootstrap of llvm-gcc-4.2. It is
Duncan Sands [Wed, 5 Dec 2007 21:03:28 +0000 (21:03 +0000)]
Commit 44487 broke bootstrap of llvm-gcc-4.2.  It is
not yet clear why, but in the meantime work around the
problem by making less use of readnone/readonly info.

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

16 years agoAdded canFoldMemoryOperand for PPC.
Evan Cheng [Wed, 5 Dec 2007 18:41:29 +0000 (18:41 +0000)]
Added canFoldMemoryOperand for PPC.

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

16 years agoUpdate foldMemoryOperand.
Evan Cheng [Wed, 5 Dec 2007 18:36:37 +0000 (18:36 +0000)]
Update foldMemoryOperand.

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

16 years agofix warnings
Chris Lattner [Wed, 5 Dec 2007 18:32:18 +0000 (18:32 +0000)]
fix warnings

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

16 years agoallow this to build
Chris Lattner [Wed, 5 Dec 2007 18:30:11 +0000 (18:30 +0000)]
allow this to build

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

16 years agoPrior commit updated wrong if, apologies.
Neil Booth [Wed, 5 Dec 2007 13:06:04 +0000 (13:06 +0000)]
Prior commit updated wrong if, apologies.

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