1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

55399 Commits

Author SHA1 Message Date
Chris Lattner
604ec33b09 improve compatibility with SWIG, patch by James Knight!
llvm-svn: 91822
2009-12-21 07:52:40 +00:00
Chris Lattner
cd9fb503c8 revert r89298, which was committed without a testcase. I think
the underlying PHI node insertion issue in SSAUpdate is fixed.

llvm-svn: 91821
2009-12-21 07:45:57 +00:00
Chris Lattner
c54fd1e777 fix PR5837 by having SSAUpdate reuse phi nodes for the
'GetValueInMiddleOfBlock' case, instead of inserting 
duplicates.

A similar fix is almost certainly needed by the machine-level
SSAUpdate implementation.

llvm-svn: 91820
2009-12-21 07:16:11 +00:00
Chris Lattner
609eded2e8 add a helper ctor.
llvm-svn: 91819
2009-12-21 07:15:15 +00:00
Eli Friedman
fe6a796851 Change StringRef::startswith and StringRef::endswith to versions which are a
bit more verbose, but optimize to much shorter code.

llvm-svn: 91817
2009-12-21 06:49:24 +00:00
Chris Lattner
ae95fddf98 add check lines for min/max tests.
llvm-svn: 91816
2009-12-21 06:08:50 +00:00
Chris Lattner
013b88ee59 really convert this to filecheck.
llvm-svn: 91815
2009-12-21 06:06:10 +00:00
Chris Lattner
c9bfe8679e give instcombine some helper functions for matching MIN and MAX, and
implement some optimizations for MIN(MIN()) and MAX(MAX()) and 
MIN(MAX()) etc.  This substantially improves the code in PR5822 but
doesn't kick in much elsewhere.  2 max's were optimized in 
pairlocalalign and one in smg2000.

llvm-svn: 91814
2009-12-21 06:03:05 +00:00
Chris Lattner
d5bdc7876d filecheckize
llvm-svn: 91813
2009-12-21 05:53:13 +00:00
Chris Lattner
f1474e1761 enhance x-(-A) -> x+A to preserve NUW/NSW.
Use the presence of NSW/NUW to fold "icmp (x+cst), x" to a constant in
cases where it would otherwise be undefined behavior.

Surprisingly (to me at least), this triggers hundreds of the times in
a few benchmarks: lencode, ldecode, and 466.h264ref seem to *really*
like this.

llvm-svn: 91812
2009-12-21 04:04:05 +00:00
Chris Lattner
d34eb29977 Optimize all cases of "icmp (X+Cst), X" to something simpler. This triggers
a bunch in lencode, ldecod, spass, 176.gcc, 252.eon, among others.  It is 
also the first part of PR5822

llvm-svn: 91811
2009-12-21 03:19:28 +00:00
Chris Lattner
072f39fd3a convert to filecheck
llvm-svn: 91810
2009-12-21 03:11:05 +00:00
Lang Hames
cd218ab335 Fixed use of phi param in SlotIndex constructors.
llvm-svn: 91790
2009-12-19 23:32:32 +00:00
Chris Lattner
07f0e8ec8a fix an overly conservative caching issue that caused memdep to
cache a pointer as being unavailable due to phi trans in the
wrong place.  This would cause later queries to fail even when
they didn't involve phi trans.

llvm-svn: 91787
2009-12-19 21:29:22 +00:00
Daniel Dunbar
4212bb197b CMake: Update lib deps.
llvm-svn: 91786
2009-12-19 21:27:30 +00:00
Chris Lattner
2c532518c0 .llx is no more.
llvm-svn: 91784
2009-12-19 20:56:53 +00:00
Chris Lattner
4f562e5f14 fix inconsistent use of tabs
llvm-svn: 91783
2009-12-19 20:44:43 +00:00
Daniel Dunbar
d170badffe Remove unused variable (noticed by clang++).
llvm-svn: 91780
2009-12-19 18:58:49 +00:00
Daniel Dunbar
758730a9e9 #if 0 out X86 disassembler for now, it is breaking the build in multiple places.
llvm-svn: 91778
2009-12-19 17:11:53 +00:00
Sanjiv Gupta
14c9f2ed42 Emit direction operand in binary insns that stores in memory.
llvm-svn: 91777
2009-12-19 13:52:01 +00:00
Sanjiv Gupta
44441a9739 Adding a bunch of options to the mcc16 driver.
llvm-svn: 91776
2009-12-19 13:13:29 +00:00
Nuno Lopes
78f040fa26 rename dprintf to dbgpritnf, in order to fix build with glibc (which already defines dprintf in stdio.h
llvm-svn: 91775
2009-12-19 12:07:00 +00:00
Nuno Lopes
d0b1ef8875 fix build and while at it remove a redudant include
llvm-svn: 91774
2009-12-19 11:52:18 +00:00
Sanjiv Gupta
df6eadc436 Test cases for changes done in 91768.
llvm-svn: 91773
2009-12-19 11:38:14 +00:00
Sanjiv Gupta
65927cebf8 1. In indirect load/store insns , the name of fsr should be emitted as INDF.
2. include standard asmbly headers in generated asmbly.

llvm-svn: 91768
2009-12-19 08:26:25 +00:00
Douglas Gregor
f39dd74a3f Fix a bunch of little errors that Clang complains about when its being pedantic
llvm-svn: 91764
2009-12-19 07:05:23 +00:00
Chris Lattner
d9bf69f1a5 fix PR5827 by disabling the phi slicing transformation in a case
where instcombine would have to split a critical edge due to a
phi node of an invoke.  Since instcombine can't change the CFG,
it has to bail out from doing the transformation.

llvm-svn: 91763
2009-12-19 07:01:15 +00:00
Bob Wilson
067a1be3e9 Update my SROA changes in response to review.
* change FindElementAndOffset to return a uint64_t instead of unsigned, and
  to identify the type to be used for that result in a GEP instruction.
* move "isa<ConstantInt>" to be first in conditional.
* replace some dyn_casts with casts.
* add a comment about handling mem intrinsics.

llvm-svn: 91762
2009-12-19 06:53:17 +00:00
Daniel Dunbar
bc03a42df1 More bzero -> memset that I missed.
llvm-svn: 91757
2009-12-19 04:16:57 +00:00
Daniel Dunbar
a1563328bb Add missing newlines at EOF (for clang++).
llvm-svn: 91756
2009-12-19 04:16:48 +00:00
Daniel Dunbar
057ae7e82e Use memset instead of bzero, its more portable.
llvm-svn: 91754
2009-12-19 03:31:50 +00:00
Douglas Gregor
d8c669390b Remove spurious semicolon. Thanks, Clang
llvm-svn: 91752
2009-12-19 03:21:36 +00:00
Sean Callanan
18fa59f381 Table-driven disassembler for the X86 architecture (16-, 32-, and 64-bit
incarnations), integrated into the MC framework.  

The disassembler is table-driven, using a custom TableGen backend to 
generate hierarchical tables optimized for fast decode.  The disassembler 
consumes MemoryObjects and produces arrays of MCInsts, adhering to the 
abstract base class MCDisassembler (llvm/MC/MCDisassembler.h).

The disassembler is documented in detail in

- lib/Target/X86/Disassembler/X86Disassembler.cpp (disassembler runtime)
- utils/TableGen/DisassemblerEmitter.cpp (table emitter)

You can test the disassembler by running llvm-mc -disassemble for i386
or x86_64 targets.  Please let me know if you encounter any problems
with it.

llvm-svn: 91749
2009-12-19 02:59:52 +00:00
Anton Korobeynikov
4e05e61a52 Bump alignment requirements for windows targets to achieve compartibility with vcpp.
Based on patch by Michael Beck!

llvm-svn: 91745
2009-12-19 02:04:23 +00:00
Anton Korobeynikov
682c6a3b74 Use 4-arg getVTList) variant instead of generic one, when possible
llvm-svn: 91744
2009-12-19 02:04:00 +00:00
Dan Gohman
b65e2548c8 Delete unused code.
llvm-svn: 91743
2009-12-19 01:47:13 +00:00
Dan Gohman
a9cdf5b0d8 Fix a spello in a comment that Nick spotted.
llvm-svn: 91742
2009-12-19 01:46:34 +00:00
Dan Gohman
17556ab401 Fix a comment.
llvm-svn: 91741
2009-12-19 01:46:09 +00:00
Chris Lattner
e390b70e2c Make some methods const. The only interesting change here is that
it changes raw_fd_ostream::preferred_buffer_size to return zero on
a scary stat failure instead of setting the stream to an error state.
This method really should not mutate the stream.

llvm-svn: 91740
2009-12-19 01:38:42 +00:00
John McCall
57eaeeca78 Qualify a bunch of explicit template instantiations to satisfy clang++.
llvm-svn: 91736
2009-12-19 00:55:12 +00:00
John McCall
fdae393452 Put TypesEqual and TypeHasCycleThroughItself in namespace llvm so ADL from
the templates in TypesContext.h can find them.  Caught by clang++.

llvm-svn: 91735
2009-12-19 00:51:42 +00:00
Bill Wendling
2a794804da Forgot forward declaration.
llvm-svn: 91732
2009-12-19 00:05:07 +00:00
Dan Gohman
4e04fb5ca8 Eliminate unnecessary LLVMContexts.
llvm-svn: 91729
2009-12-18 23:42:08 +00:00
Bill Wendling
aed33d79ab Changes from review:
- Move DisableScheduling flag into TargetOption.h
- Move SDNodeOrdering into its own header file. Give it a minimal interface that
  doesn't conflate construction with storage.
- Move assigning the ordering into the SelectionDAGBuilder.

This isn't used yet, so there should be no functional changes.

llvm-svn: 91727
2009-12-18 23:32:53 +00:00
Dan Gohman
f4af7d049c Make this comment more precise.
llvm-svn: 91722
2009-12-18 23:18:03 +00:00
Eli Friedman
241630ece5 Fix an issue in googletest where a name was used before it was defined.
llvm-svn: 91718
2009-12-18 21:38:44 +00:00
Evan Cheng
bc37151dea Increase opportunities to optimize (brcond (srl (and c1), c2)).
llvm-svn: 91717
2009-12-18 21:31:31 +00:00
Eli Friedman
a5dba5246a Fix gcc warning.
llvm-svn: 91715
2009-12-18 21:07:18 +00:00
Rafael Espindola
c58aaaf793 Catch more cases of a pointer being marked garbage twice. This helps when
debugging some leaks (PR5770 in particular).

llvm-svn: 91713
2009-12-18 20:35:38 +00:00
Bob Wilson
03b6955c7f Reapply 91459 with a simple fix for the problem that broke the x86_64-darwin
bootstrap.  This also replaces the WeakVH references that Chris objected to
with normal Value references.

llvm-svn: 91711
2009-12-18 20:14:40 +00:00