Commit Graph

48994 Commits

Author SHA1 Message Date
Dan Gohman 3666c34db8 Convert instcombine from using using getAnalysis<TargetData> to
getAnalysisIfAvailable<TargetData>.

llvm-svn: 76676
2009-07-21 23:21:54 +00:00
Dan Gohman 9413de19b1 Permit the IntPtrTy argument to isEliminableCastPair to be null,
to help support use when TargetData is not available.

llvm-svn: 76675
2009-07-21 23:19:40 +00:00
Chris Lattner 843f55346b fix typo
llvm-svn: 76674
2009-07-21 23:17:26 +00:00
Bruno Cardoso Lopes 40ca1f1c2e Change ELFCodeEmitter logic to emit the constant pool and jump tables to
their appropriate sections before the code itself. They need to be emitted
before the function because on some targets (x86 but not x86_64) the later
may reference a JT or CP entry address

llvm-svn: 76672
2009-07-21 23:13:26 +00:00
Dan Gohman 430f0cc544 Replace the original ad-hoc code for determining whether (v pred w) implies
(x pred y) with more thorough code that does more complete canonicalization
before resorting to range checks. This helps it find more cases where
the canonicalized expressions match.

llvm-svn: 76671
2009-07-21 23:03:19 +00:00
Evan Cheng 332a6590ae Remove a big test case.
llvm-svn: 76669
2009-07-21 22:52:04 +00:00
Chris Lattner 3a56ae8bbb Various doc updates from Edward O'Callaghan!
llvm-svn: 76668
2009-07-21 22:47:03 +00:00
Chris Lattner 0ecf7b6f4a remove the last bits of SectionFlagsForGlobal. There is some flag here that
depends on XS1A, but I think the ReadOnlySection is already set up for this
and there is no testcase that this breaks.  If this is really needed, we can
add the appropriate parameterization to TargetAsmInfo in the future to support
this.

llvm-svn: 76667
2009-07-21 22:42:37 +00:00
Chris Lattner bf4bc25236 don't mask out the small flag and then reapply it later.
llvm-svn: 76666
2009-07-21 22:39:28 +00:00
Chris Lattner 684d5fe95d if Xcore doesn't support TLS, it doesn't have to worry about thread local LLVM IR, it should be rejected by a front-end.
llvm-svn: 76665
2009-07-21 22:37:38 +00:00
Chris Lattner 43893573f4 remove the Xcore implementation of SelectSectionForGlobal. While you have
to twist your brain to see it, I believe it is the same as ELFTargetAsmInfo::SelectSectionForGlobal.

llvm-svn: 76664
2009-07-21 22:36:53 +00:00
Chris Lattner 83e6f9370d simplify based on the fact that darwin always uses L/l.
llvm-svn: 76662
2009-07-21 22:32:55 +00:00
Chris Lattner 5626b88047 make some stuff private.
llvm-svn: 76661
2009-07-21 22:30:39 +00:00
Chris Lattner 0d982f9a8a improve comments.
llvm-svn: 76660
2009-07-21 22:30:25 +00:00
Chris Lattner aa30d25bb4 Remove the XCore custom implementation of MergeableConstSection, relying on
the generic ELF version instead.  This will result in its mergable constant
sections getting named ".rodata.cst4" instead of ".cp.const4", but the
linker looks at the section flags, not the name of the section AFAICT.

llvm-svn: 76659
2009-07-21 22:25:52 +00:00
Bob Wilson e3228acc62 Fix ocaml tests for 64-bit MacOS systems. LLVM is currently built
as 32-bit code by default, and if gcc defaults to 64-bit code then ocamlc
requires a -cc "gcc -arch i386" option.  We were hardcoding -cc g++
and throwing away any other compiler options that were determined when
ocamlc was configured and built.

llvm-svn: 76658
2009-07-21 21:56:46 +00:00
Bob Wilson c2a942ec54 Reorder the "Metadata" entry to match the C bindings.
This fixes a regression in the vmcore.ml dejagnu test.

llvm-svn: 76657
2009-07-21 21:52:57 +00:00
Daniel Dunbar b5ea06bbbf Add missing include
llvm-svn: 76655
2009-07-21 21:33:58 +00:00
Chris Lattner 4d5c3b2e86 inline a trivial method into its only call site and fix indentation of cases
llvm-svn: 76654
2009-07-21 21:29:08 +00:00
Chris Lattner fd047e11a1 Remove some overridden functions in XCoreTargetAsmInfo that are
implemented exactly the same way as its ELFTargetAsmInfo subclass 
has them.

llvm-svn: 76653
2009-07-21 21:26:32 +00:00
Chris Lattner 1eede6c635 revert r76602, 76603, and r76615, pending design discussions.
llvm-svn: 76646
2009-07-21 21:12:58 +00:00
Chris Lattner c21954dff6 minor cleanups.
llvm-svn: 76645
2009-07-21 21:09:35 +00:00
Owen Anderson 3d34492c1f Privatize the ConstantArray table.
llvm-svn: 76639
2009-07-21 20:55:28 +00:00
Torok Edwin 944df00962 Add a few fairly obvious API changes I noticed while porting some old code.
llvm-svn: 76636
2009-07-21 20:27:10 +00:00
Eli Friedman 1f74b1fdfd Missed a piece of the commit to remove the shift flavor.
llvm-svn: 76635
2009-07-21 20:15:24 +00:00
Owen Anderson 39ede7b8d1 Privatize the first of the value maps.
llvm-svn: 76634
2009-07-21 20:13:12 +00:00
Eli Friedman da9eda8ef6 Remove shift amount flavor. It isn't actually complete enough to
be useful, and it's currently unused.  (Some issues: it isn't actually 
rich enough to capture the semantics on many architectures, and
semantics can vary depending on the type being shifted.)

llvm-svn: 76633
2009-07-21 20:12:16 +00:00
Eli Friedman 1e08ca7313 Remove a couple of already-implemented notes.
llvm-svn: 76631
2009-07-21 20:05:43 +00:00
Evan Cheng c9ec735aa8 80 col violation.
llvm-svn: 76629
2009-07-21 19:25:09 +00:00
David Greene ef1f36d3c7 Prefix IR dumps with LiveInterval indices when possible. This turns
this:

	%ESI<def> = MOV32rr %EDI<kill>
	ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
	%reg1027<def> = MOVZX64rr32 %ESI
	%reg1027<def> = ADD64ri8 %reg1027, 15, %EFLAGS<imp-def,dead>
	%reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
	%RDI<def> = MOV64rr %RSP
	%RDI<def> = SUB64rr %RDI, %reg1027<kill>, %EFLAGS<imp-def,dead>
	%RSP<def> = MOV64rr %RDI

into this:

4	%reg1024<def> = MOV32rr %EDI<kill>
12	ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
20	%reg1025<def> = MOVZX64rr32 %reg1024
28	%reg1026<def> = MOV64rr %reg1025<kill>
36	%reg1026<def> = ADD64ri8 %reg1026, 15, %EFLAGS<imp-def,dead>
44	%reg1027<def> = MOV64rr %reg1026<kill>
52	%reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
60	%reg1028<def> = MOV64rr %RSP
68	%reg1029<def> = MOV64rr %reg1028<kill>
76	%reg1029<def> = SUB64rr %reg1029, %reg1027<kill>, %EFLAGS<imp-def,dead>
84	%RSP<def> = MOV64rr %reg1029

This helps greatly when debugging register allocation and coalescing
problems.

llvm-svn: 76615
2009-07-21 18:56:32 +00:00
Evan Cheng 18e32946f8 Add fake v7 itineraries for now.
llvm-svn: 76612
2009-07-21 18:54:14 +00:00
Chris Lattner 100865e59d make AsmPrinter::doFinalization iterate over the global variables
and call PrintGlobalVariable, allowing elimination and simplification
of various targets.

llvm-svn: 76604
2009-07-21 18:38:57 +00:00
David Greene 3b458645be Add PrefixPrinter arguments to the dump routines for MachineFunction and
MachineBasicBlock.  We'll use these shortly.

llvm-svn: 76603
2009-07-21 18:27:05 +00:00
David Greene 92ebf9dd6e Add a small utility class to configure IR printers. This will allow
printers to do neat and wonderful things when printing debug
information.  The ideas is to allow passes to configer printers to emit
pass-specific information when dumping IR.

llvm-svn: 76602
2009-07-21 18:21:46 +00:00
David Greene 5e165083a0 Make a bunch of changes suggested by Chris and others to improve
efficiency.  Fix a few formatting bugs along the way.

llvm-svn: 76601
2009-07-21 18:16:24 +00:00
Evan Cheng 38e88cb53f Do not select tSXTB / tSXTH in thumb2 mode.
llvm-svn: 76600
2009-07-21 18:15:26 +00:00
Owen Anderson c37bc69e91 Rename getConstantInt{True|False} to get{True|False} at Chris' behest.
llvm-svn: 76598
2009-07-21 18:03:38 +00:00
Torok Edwin 26aafc1ab5 Add freed memory poisoning in !NDEBUG mode for DenseMap.
llvm-svn: 76597
2009-07-21 18:01:37 +00:00
Chris Lattner f5f5880c5a reduce indentation by using an early exit.
llvm-svn: 76596
2009-07-21 17:59:36 +00:00
Ted Kremenek d0014cf36d Update CMake files.
llvm-svn: 76595
2009-07-21 17:43:20 +00:00
Ted Kremenek 4f9b1d0327 Use string comparison instead of numeric comparison when comparing digests.
llvm-svn: 76594
2009-07-21 17:41:55 +00:00
Chris Lattner 767e90ef30 whitespace cleanups, make the MipsAsmPrinter::doInitialization
chain to the super class instead of initializing mangler directly.
This gives it .file and module level inline asm support among other
things.

llvm-svn: 76593
2009-07-21 17:39:48 +00:00
Chris Lattner 249df80306 fix Sparc, SystemZ, and MSP430 to not override AsmPrinter::doInitialization.
This eliminates redundancy setting up the mangler and adds support to them
for module-level inline asm and a .file directive.

llvm-svn: 76592
2009-07-21 17:37:35 +00:00
Chris Lattner 8e55200089 convert this test to filecheck format, which is faster and avoids false matches of "st" -> "stdin"
llvm-svn: 76591
2009-07-21 17:36:24 +00:00
Chris Lattner 1177cee9dc Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the
LLVM IR concept.

llvm-svn: 76590
2009-07-21 17:30:51 +00:00
Daniel Dunbar 731269f9a7 Move StringRef comparison operators out of class.
Also, tweak the return type of size().

llvm-svn: 76588
2009-07-21 17:25:46 +00:00
Chris Lattner ca8192744a fix indentation
llvm-svn: 76587
2009-07-21 17:25:13 +00:00
Chris Lattner b43f7cba73 remove an unneeded override.
llvm-svn: 76586
2009-07-21 17:23:41 +00:00
Chris Lattner ecaf7dedd2 more random whitespace cleanup, eliminate #define, avoid copying
vectors needlessly, doxygenify comments, improve constness, etc.

llvm-svn: 76585
2009-07-21 17:20:18 +00:00
Chris Lattner b61f9c8c8d add a testcase for the pic16 section handling stuff.
llvm-svn: 76579
2009-07-21 16:48:20 +00:00