1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

45357 Commits

Author SHA1 Message Date
Evan Cheng
fab64fcb5d xfail these tests for now.
llvm-svn: 67143
2009-03-18 00:44:45 +00:00
Chris Lattner
205380a4e4 Disable the "call to immediate" optimization on x86-64. It is
not safe in general because the immediate could be an arbitrary
value that does not fit in a 32-bit pcrel displacement.  
Conservatively fall back to loading the value into a register
and calling through it.

We still do the optzn on X86-32.

llvm-svn: 67142
2009-03-18 00:43:52 +00:00
Chris Lattner
7bef74e92f Fix PR3807 by inserting 'insertelement' instructions in the normal dest of
an invoke instead of after the invoke (in its block), which is invalid.

llvm-svn: 67139
2009-03-18 00:31:45 +00:00
Bill Wendling
28358589ec A more proper -mtriple.
llvm-svn: 67138
2009-03-18 00:19:44 +00:00
Bill Wendling
8ec55afd27 Temporary fix. I think Rafael wanted this to be Linux-only.
llvm-svn: 67137
2009-03-18 00:16:36 +00:00
Chris Lattner
ee2d69fc7b LSR shouldn't ever try to hack on integer IV's larger than 64-bits. Right now
it is not APInt clean, but even when it is it needs to be evaluated carefully
to determine whether it is actually profitable.

This fixes a crash on PR3806

llvm-svn: 67134
2009-03-17 23:58:30 +00:00
Rafael Espindola
6a6d9e48dd Don't force promotion of return arguments on the callee.
Some architectures (like x86) don't require it.
This fixes bug 3779.

llvm-svn: 67132
2009-03-17 23:43:59 +00:00
Daniel Dunbar
7c9dba0950 Add BUILTIN_EXPECT Support/Compiler macro.
- Use for exceptional buffer conditions in raw_ostream:write to shave
   off a cycle or two.

 - Please rename if you have a better one.

llvm-svn: 67103
2009-03-17 21:15:18 +00:00
Chris Lattner
970d2828f4 this is apparently passing now. Evan/Dan, please check
to see if this is producing the expected code or not, I'm
not sure what the test was intended to check.

llvm-svn: 67099
2009-03-17 20:23:43 +00:00
Devang Patel
42caec9a83 test case for rev. 67095.
llvm-svn: 67096
2009-03-17 19:47:21 +00:00
Chris Lattner
e3c442050d Fix codegen to compute the size of an allocation by multiplying the
size by the array amount as an i32 value instead of promoting from
i32 to i64 then doing the multiply.  Not doing this broke wrap-around
assumptions that the optimizers (validly) made.  The ultimate real
fix for this is to introduce i64 version of alloca and remove mallocinst.

This fixes PR3829

llvm-svn: 67093
2009-03-17 19:36:00 +00:00
Chris Lattner
43ae27a75e Remove a condition which is always true.
llvm-svn: 67089
2009-03-17 17:55:15 +00:00
Evan Cheng
3e355f6c0d Add newline at end of file.
llvm-svn: 67085
2009-03-17 17:08:25 +00:00
Scott Michel
a023598ad3 CellSPU:
Revert inadvertent mis-fix of fneg.

llvm-svn: 67084
2009-03-17 16:45:16 +00:00
Daniel Dunbar
41c5cb70e2 Minimal raw_ostream unit tests
llvm-svn: 67083
2009-03-17 16:14:59 +00:00
Sanjiv Gupta
390dd214db r66870 missed this out.
llvm-svn: 67082
2009-03-17 15:46:15 +00:00
Gabor Greif
9ef10da3e7 typo
llvm-svn: 67080
2009-03-17 11:38:29 +00:00
Duncan Sands
34e7f207ee Reapply r67049, with the test adjusted for darwin
(which produces "call L_f$stub" rather than "call f").

llvm-svn: 67079
2009-03-17 09:46:22 +00:00
Mon P Wang
7184e30bdb Fix a problem with DAGCombine where we were building an illegal build
vector shuffle mask. Forced the mask to be built using i32.  Note: this will
be irrelevant once vector_shuffle no longer takes a build vector for the
shuffle mask.

llvm-svn: 67076
2009-03-17 06:33:10 +00:00
Dan Gohman
f6c57d0fe7 Recognize bswapl as bswap too.
llvm-svn: 67072
2009-03-17 02:45:40 +00:00
Dan Gohman
4efda2b52b Recognize "bswapq" as an alternate spelling for the bswap instruction.
llvm-svn: 67071
2009-03-17 02:17:27 +00:00
Daniel Dunbar
e9d33b08eb raw_ostream: Return '*this' explicitly (instead of implicitly via
write) to expose more alias information.

llvm-svn: 67070
2009-03-17 01:53:36 +00:00
Daniel Dunbar
2cc1ec75e1 raw_ostream: Put all exceptional conditions in raw_ostream::write
under a single branch.

Also, add a FIXME for formatted output.

llvm-svn: 67069
2009-03-17 01:36:56 +00:00
Evan Cheng
0dccb325d1 Spiller may unfold load / mod / store instructions as an optimization when the would be loaded value is available in a register. It needs to check if it's legal to clobber the register. Also, the register can contain values of multiple spill slots, make sure to check all instead of just the one being unfolded.
llvm-svn: 67068
2009-03-17 01:23:09 +00:00
Scott Michel
2c4ac99ef8 CellSPU:
- Fix fabs, fneg for f32 and f64.
- Use BuildVectorSDNode.isConstantSplat, now that the functionality exists
- Continue to improve i64 constant lowering. Lower certain special constants
  to the constant pool when they correspond to SPU's shufb instruction's
  special mask values. This avoids the overhead of performing a shuffle on a
  zero-filled vector just to get the special constant when the memory load
  suffices.

llvm-svn: 67067
2009-03-17 01:15:45 +00:00
Daniel Dunbar
b04be1838d raw_ostream: Rework implementation of unbuffered streams so outputting
a single character requires only one branch to follow slow path.
 - Never use a buffer when writing on an unbuffered stream.

 - Move default buffer size to header.

llvm-svn: 67066
2009-03-17 01:13:35 +00:00
Dale Johannesen
0e13f2b022 Fix a debug info dependency in jump threading.
llvm-svn: 67064
2009-03-17 00:38:24 +00:00
Daniel Dunbar
2062a58347 raw_ostream: Replace flush_impl with write_impl, which takes data to
write as arguments.
 - Add raw_ostream::GetNumBytesInBuffer.
 - Privatize buffer pointers.
 - Get rid of slow and unnecessary code for writing out large strings.

llvm-svn: 67060
2009-03-16 23:29:31 +00:00
Daniel Dunbar
c2d554fe0b raw_ostream: Lift out flush_nonempty.
- Flush a known non-empty buffers; enforces the interface to
   flush_impl and kills off HandleFlush (which I saw no reason to be
   an inline method, Chris?).

 - Clarify invariant that flush_impl is only called with OutBufCur >
   OutBufStart.

 - This also cleary collects all places where we have to deal with the
   buffer possibly not existing.

 - A few more comments and fixing the unbuffered behavior remain in
   this commit sequence.

llvm-svn: 67057
2009-03-16 22:55:06 +00:00
Douglas Gregor
f15b4edb34 CMake: Build system fixes for XCode. llvm-config still causes us some serious trouble, but it's less serious than it used to be
llvm-svn: 67056
2009-03-16 22:53:26 +00:00
Daniel Dunbar
5ef319c7d7 Make raw_ostream::operator<<(const void *) fast; it doesn't matter but
it is easy.

llvm-svn: 67054
2009-03-16 22:08:44 +00:00
Daniel Dunbar
c64fdabf4f Add slow path for single character write, and use exclusively for
single characters writes outside of the fast path in raw_ostream.h

llvm-svn: 67053
2009-03-16 22:00:17 +00:00
Douglas Gregor
5f2d01236e CMake: Make sure to build TableGen'd files in the binary directory
llvm-svn: 67052
2009-03-16 21:35:18 +00:00
Bill Wendling
51bfef84e1 --- Reverse-merging (from foreign repository) r67049 into '.':
U    test/CodeGen/X86/2009-03-13-PHIElimBug.ll
D    test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll
U    lib/CodeGen/PHIElimination.cpp

r67049 was causing this failure:

Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/2009-03-13-PHIElimBug.ll for PR3784
Failed with exit(1) at line 1
while running:  llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/2009-03-13-PHIElimBug.ll |  llc -march=x86 | /usr/bin/grep -A 2 {call f} | /usr/bin/grep movl
child process exited abnormally

llvm-svn: 67051
2009-03-16 20:27:20 +00:00
Duncan Sands
8572084279 Tweak the fix for PR3784: be less sensitive about just
how invokes are set up.  The fix could be disturbed by
register copies coming after the EH_LABEL, and also didn't
behave quite right when it was the invoke result that
was used in a phi node.  Also (see new testcase) fix
another phi elimination bug while there: register copies
in the landing pad need to come after the EH_LABEL, because
that's where execution branches to when unwinding.  If they
come before the EH_LABEL then they will never be executed...
Also tweak the original testcase so it doesn't use a no-longer
existing counter.
The accumulated phi elimination changes fix two of seven Ada
testsuite failures that turned up after landing pad critical
edge splitting was turned off.  So there's probably more to come.

llvm-svn: 67049
2009-03-16 19:58:38 +00:00
Scott Michel
2e2bccf754 CellSPU:
Incorporate Tilmann's 128-bit operation patch. Evidently, it gets the
llvm-gcc bootstrap a bit further along.

llvm-svn: 67048
2009-03-16 18:47:25 +00:00
Chris Lattner
f8afc9ecda change this to test for an alias result more directly.
llvm-svn: 67046
2009-03-16 18:28:27 +00:00
Douglas Gregor
7bc62681cf Add TGSourceMgr.cpp to CMake build, sort lines
llvm-svn: 67042
2009-03-16 17:04:14 +00:00
Bruno Cardoso Lopes
2aada0dc02 This causes incorrect stack frame allocation when the last object is an array allocated on the stack which would lead
the compiled program to run over its stack. Thanks to Gil Dogon

llvm-svn: 67034
2009-03-15 23:28:07 +00:00
Nick Lewycky
5b5130fe0e Simplify. "Broken" is always true here.
llvm-svn: 67025
2009-03-15 06:40:32 +00:00
Nick Lewycky
377d0aaf06 Remove obviously redundant call.
llvm-svn: 67023
2009-03-15 06:39:52 +00:00
Owen Anderson
2648d3fad8 Give the pre-alloc splitter access to the VirtRegMap. It doesn't do anything
useful with it at the moment, but it will in the future.

llvm-svn: 67012
2009-03-14 21:40:05 +00:00
Nick Lewycky
d271c19fea Add a replacement for 2009-02-12-GEPNoalias.ll that works without -debug.
llvm-svn: 67011
2009-03-14 19:40:09 +00:00
Dan Gohman
4646e714c4 Apply a patch by Micah Villmow to fix AsmParser to accept vector
shift constant expressions, and add support for folding vector
shift constant expressions. This fixes PR3802.

llvm-svn: 67010
2009-03-14 17:09:17 +00:00
Sebastian Redl
5fb9613105 Fix Clang build for srcdir != objdir
llvm-svn: 67008
2009-03-14 14:42:51 +00:00
Sebastian Redl
0579fd8f8d Add support for generating Clang diagnostic defs to Makefile.rules.
llvm-svn: 67006
2009-03-14 11:59:18 +00:00
Sebastian Redl
da664dfdd7 Add TableGen syntax highlighting for the jEdit editor.
llvm-svn: 67005
2009-03-14 10:15:32 +00:00
Dan Gohman
c938e0ab02 Add a testcase that covers a wide variety of ABI isel cases.
llvm-svn: 67003
2009-03-14 02:35:10 +00:00
Dan Gohman
fd6debff99 Use %rip-relative addressing on x86-64 whenever practical, as
it has a smaller encoding than absolute addressing.

llvm-svn: 67002
2009-03-14 02:33:41 +00:00
Dan Gohman
e7495ef7aa Don't forego folding of loads into 64-bit adds when the other
operand is a signed 32-bit immediate. Unlike with the 8-bit
signed immediate case, it isn't actually smaller to fold a
32-bit signed immediate instead of a load. In fact, it's
larger in the case of 32-bit unsigned immediates, because
they can be materialized with movl instead of movq.

llvm-svn: 67001
2009-03-14 02:07:16 +00:00