Commit Graph

63720 Commits

Author SHA1 Message Date
Chris Lattner fab2059d0e don't set the small flag yet.
llvm-svn: 76706
2009-07-22 00:30:39 +00:00
Chris Lattner b300a4f988 remove the SelectSectionForMachineConst hook, replacing it with
a new getSectionForMergableConstant hook.  This removes one dependence
of TAI on Type, and provides the hook with enough info to make the 
right decision based on whether the global has relocations etc.

llvm-svn: 76705
2009-07-22 00:28:43 +00:00
Douglas Gregor 168190d822 Complain if we're entering the context of a dependent nested-name-specifier but
cannot match that nested-name-specifier to a class template or class template
partial specialization.

llvm-svn: 76704
2009-07-22 00:28:09 +00:00
Evan Cheng 4dc848f3e8 Let each target determines whether a machine instruction is dead. If true, that allows late codeine passes to delete it.
This is considered a workaround. The problem is some targets are not modeling side effects correctly. PPC is apparently one of those. This patch allows ppc llvm-gcc to bootstrap on Darwin. Once we find out which instruction definitions are wrong, we can remove the PPCInstrInfo workaround.

llvm-svn: 76703
2009-07-22 00:25:27 +00:00
Owen Anderson 47db941fd3 Get rid of the Pass+Context magic.
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Chris Lattner 4565ef5b65 reimplement Constant::ContainsRelocations as
Constant::getRelocationInfo(), which has a much simpler
to use API.  It still should not be part of libvmcore, but
is better than it was.  Also teach it to be smart about 
hidden visibility.

llvm-svn: 76700
2009-07-22 00:05:44 +00:00
Dan Gohman 71dfd782ce Misc. doc fixes following suggestions from Eli.
llvm-svn: 76699
2009-07-22 00:04:19 +00:00
Evan Cheng 87aaa194f9 Fixing cp island pass. Step 1: Determine whether the constant pool offset can be
negative on an individual bases rather than basing on whether it's in thumb
mode.

llvm-svn: 76698
2009-07-21 23:56:01 +00:00
Evan Cheng f206d925a5 Fix comment.
llvm-svn: 76693
2009-07-21 23:54:22 +00:00
Douglas Gregor d8d297c0ac Basic parsing and semantic analysis for out-of-line definitions of the
member functions of class templates, e.g.,

  template<typename T> 
  struct X {
    void f(T);
  };

  template<typename T> X<T>::f(T) { /* ... */ }

llvm-svn: 76692
2009-07-21 23:53:31 +00:00
Mike Stump 93a7ed1fc7 Revert this, we can now avoid error cascades better.
llvm-svn: 76691
2009-07-21 23:52:50 +00:00
Mike Stump 5c1acd1f33 Revert this, was a bug in my new warning code, not the test case.
llvm-svn: 76690
2009-07-21 23:50:15 +00:00
Chris Lattner aa17ab0669 simplify code now that it is inlined.
llvm-svn: 76689
2009-07-21 23:49:55 +00:00
Lang Hames aa037759b2 Exposed PHIElimination pass within CodeGen.
llvm-svn: 76688
2009-07-21 23:47:33 +00:00
Mike Stump 0ab3c3deac Revert this, we have a better way to do this.
llvm-svn: 76687
2009-07-21 23:47:12 +00:00
Chris Lattner e61aff6df1 Now that RelocBehaviour() is never overloaded, it doesn't need to be
virtual.  Just inline it into its two current call sites in preparation
for simplifying the code.

llvm-svn: 76686
2009-07-21 23:47:11 +00:00
Mike Stump d8679446a3 Revert this, we have a better way to handle this.
llvm-svn: 76685
2009-07-21 23:45:39 +00:00
Eric Christopher 90c67c6310 Add intrinsic for __builtin_ia32_vec_set_v4si which turns out to be
pinsrd in sse4.1.

llvm-svn: 76684
2009-07-21 23:43:14 +00:00
Chris Lattner bc2482a0a4 this doesn't break any of the 4 ia64 tests.
llvm-svn: 76683
2009-07-21 23:42:24 +00:00
Chris Lattner e41745f837 alpha doesn't need to redefine this: it only supports PIC codegen anyway.
llvm-svn: 76682
2009-07-21 23:41:35 +00:00
Mike Stump d7b9282e48 Revert recent change, I now have a better way to solve this (thanks Chris).
llvm-svn: 76681
2009-07-21 23:41:23 +00:00
David Greene 3424275325 Add some support for iterative coalescers to calculate a joined live
range's weight properly.  This is turned off right now in the sense that
you'll get an assert if you get into a situation that can only be caused
by an iterative coalescer.  All other code paths operate exactly as
before so there is no functional change with this patch.  The asserts
should be disabled if/when an iterative coalescer gets added to trunk.

llvm-svn: 76680
2009-07-21 23:36:14 +00:00
Chris Lattner 9bd736e2f7 no really, I can spell!
llvm-svn: 76679
2009-07-21 23:36:01 +00:00
Chris Lattner cfb01e26bc add an API so target-independent codegen can determine if a constant
pool entry will require relocations against it.  I implemented this
conservatively for ARM, someone who is knowledgable about it should
see if this can be improved.

llvm-svn: 76678
2009-07-21 23:34:23 +00:00
Ted Kremenek 8be513822c Fix long-lurking bug in ObjCSummaryCache revealed by Torok's recent memory
poisoning changes to DenseMap. We were using an iterator after it had been
invalidated by an insertion into the DenseMap.

llvm-svn: 76677
2009-07-21 23:27:57 +00:00
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
Mike Stump bdbe099dd2 Prep for new warning.
llvm-svn: 76670
2009-07-21 22:54:02 +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
Fariborz Jahanian aee31ac316 Patch to accomodate Doug's comment on default
destruction of base/members for each destructor AST.

llvm-svn: 76663
2009-07-21 22:36:06 +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
Ted Kremenek c1986570ed Remove stale comment and fix RUN line.
llvm-svn: 76656
2009-07-21 21:48:25 +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
Ted Kremenek f0951f6d41 Add test case for PR 4596, which is already fixed due to Steve Naroff's overhaul of the Objective-C type system, but isn't in a checker build yet.
llvm-svn: 76648
2009-07-21 21:21:04 +00:00
Ted Kremenek 6dec002981 Patch by Stefan Bühler: Escape text in macro expansion when emitting HTML in the HTMLRewriter.
This fixes PR 4602.

llvm-svn: 76647
2009-07-21 21:16:46 +00:00