Commit Graph

55154 Commits

Author SHA1 Message Date
Bill Wendling 6de55a0efd Place SDNodeOrdering.h in the directory it's used.
llvm-svn: 91834
2009-12-21 19:34:59 +00:00
Bob Wilson 88a0598fe8 Remove special-case SROA optimization of variable indexes to one-element and
two-element arrays.  After restructuring the SROA code, it was not safe to
do this without adding more checking.  It is not clear that this special-case
has really been useful, and removing this simplifies the code quite a bit.

llvm-svn: 91828
2009-12-21 18:39:47 +00:00
Daniel Dunbar 0fc1f6c595 XFAIL these tests on powerpc, under the assumption that no one cares. If you care, feel free to fix.
llvm-svn: 91826
2009-12-21 17:31:59 +00:00
Eric Christopher a91c0f48e6 Fix setting and default setting of code model for jit. Do this
by allowing backends to override routines that will default
the JIT and Static code generation to an appropriate code model
for the architecture.

Should fix PR 5773.

llvm-svn: 91824
2009-12-21 08:15:29 +00:00
Eli Friedman dbe2aa91b9 A couple minor README updates.
llvm-svn: 91823
2009-12-21 08:03:16 +00:00
Chris Lattner a0a51c7b0e improve compatibility with SWIG, patch by James Knight!
llvm-svn: 91822
2009-12-21 07:52:40 +00:00
Chris Lattner 4edfcb88e1 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 8fb07c5a21 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 080f666e01 add a helper ctor.
llvm-svn: 91819
2009-12-21 07:15:15 +00:00
Eli Friedman 00879d8faa 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 7bc85a931e add check lines for min/max tests.
llvm-svn: 91816
2009-12-21 06:08:50 +00:00
Chris Lattner 33269813df really convert this to filecheck.
llvm-svn: 91815
2009-12-21 06:06:10 +00:00
Chris Lattner d4fb4296df 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 7a72d50de7 filecheckize
llvm-svn: 91813
2009-12-21 05:53:13 +00:00
Chris Lattner ffbd02829c 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 900ce231f9 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 d18b455086 convert to filecheck
llvm-svn: 91810
2009-12-21 03:11:05 +00:00
Lang Hames 0209f50c0d Fixed use of phi param in SlotIndex constructors.
llvm-svn: 91790
2009-12-19 23:32:32 +00:00
Chris Lattner 25bf6f8946 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 039d6e11a8 CMake: Update lib deps.
llvm-svn: 91786
2009-12-19 21:27:30 +00:00
Chris Lattner 5c13f389cb .llx is no more.
llvm-svn: 91784
2009-12-19 20:56:53 +00:00
Chris Lattner 95b431dd32 fix inconsistent use of tabs
llvm-svn: 91783
2009-12-19 20:44:43 +00:00
Daniel Dunbar 877075a41f Remove unused variable (noticed by clang++).
llvm-svn: 91780
2009-12-19 18:58:49 +00:00
Daniel Dunbar 4750efc28a #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 8ac077df57 Emit direction operand in binary insns that stores in memory.
llvm-svn: 91777
2009-12-19 13:52:01 +00:00
Sanjiv Gupta bdef02be69 Adding a bunch of options to the mcc16 driver.
llvm-svn: 91776
2009-12-19 13:13:29 +00:00
Nuno Lopes 3ed6d6003c 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 91b866a163 fix build and while at it remove a redudant include
llvm-svn: 91774
2009-12-19 11:52:18 +00:00
Sanjiv Gupta bda8002e7f Test cases for changes done in 91768.
llvm-svn: 91773
2009-12-19 11:38:14 +00:00
Sanjiv Gupta 4f469974b2 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 740ab38bb7 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 4ad5eba568 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 c16811b575 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 3a821f7f0c More bzero -> memset that I missed.
llvm-svn: 91757
2009-12-19 04:16:57 +00:00
Daniel Dunbar f008ea5fa0 Add missing newlines at EOF (for clang++).
llvm-svn: 91756
2009-12-19 04:16:48 +00:00
Daniel Dunbar c745a620a2 Use memset instead of bzero, its more portable.
llvm-svn: 91754
2009-12-19 03:31:50 +00:00
Douglas Gregor 0a66daf900 Remove spurious semicolon. Thanks, Clang
llvm-svn: 91752
2009-12-19 03:21:36 +00:00
Sean Callanan 04cc307edd 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 148d87b0b0 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 10590171fa Use 4-arg getVTList) variant instead of generic one, when possible
llvm-svn: 91744
2009-12-19 02:04:00 +00:00
Dan Gohman a73df58110 Delete unused code.
llvm-svn: 91743
2009-12-19 01:47:13 +00:00
Dan Gohman 876f45d7d2 Fix a spello in a comment that Nick spotted.
llvm-svn: 91742
2009-12-19 01:46:34 +00:00
Dan Gohman b0da63da1e Fix a comment.
llvm-svn: 91741
2009-12-19 01:46:09 +00:00
Chris Lattner dd3e9aaad3 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 086bb4ef82 Qualify a bunch of explicit template instantiations to satisfy clang++.
llvm-svn: 91736
2009-12-19 00:55:12 +00:00
John McCall 791e5c9dd5 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 57f2a6187a Forgot forward declaration.
llvm-svn: 91732
2009-12-19 00:05:07 +00:00
Dan Gohman f902c8c1b5 Eliminate unnecessary LLVMContexts.
llvm-svn: 91729
2009-12-18 23:42:08 +00:00
Bill Wendling 022d18fa3f 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 7db230f5c9 Make this comment more precise.
llvm-svn: 91722
2009-12-18 23:18:03 +00:00