Commit Graph

63736 Commits

Author SHA1 Message Date
Chris Lattner 6720d7edda add some more topics to the coding standards doc:
* Use Early Exits and 'continue' to Simplify Code
* Turn Predicate Loops into Predicate Functions
* Spaces Before Parentheses
* Namespace Indentation
* Anonymous Namespaces

llvm-svn: 76723
2009-07-22 05:40:54 +00:00
Eli Friedman 326d3a1bc8 Attempt to fix BuildBot breakage with MSVC.
llvm-svn: 76722
2009-07-22 05:06:41 +00:00
Ted Kremenek 952a004298 Restructure ProgramPoint to have the 'Kind' value be its own instance
variable.  This gives us much more flexibility with defining more
ProgramPoints, which is the direction we are heading.  The removal of
various bit-mangling of pointers also cleans up the logic.

llvm-svn: 76721
2009-07-22 04:38:22 +00:00
Ted Kremenek 920ad71dab Temporarily disable most use of region casts in RegionStoreManager,
instead preferring to use the a region's actual type when creating
symbols and using the QualType passed to Retrieve for implicit
casting.  This preprocessor logic is temporary; eventually we will
either remove region casts or keep them.

Temporarily toggle (via preprocessor directives) that SymbolicRegions
with heap storage are not undefined, but instead should be
symbolicated.  If we want to model that a SymbolicRegion is
uninitialized, we can explicitly model that by binding UndefinedVal to
that region.  It turns out that we want to treat most heap objects as
being defined, not the other way around.

llvm-svn: 76720
2009-07-22 04:35:42 +00:00
Ted Kremenek b2d0409d50 Fix a crasher in StoreManager::InvalidateRegion() caused by using the
'cast type' of a region to invalidate its binding.  This only occurs
when using RegionStoreManager, as it records the cast type.  I'm
currently considering removing the notion of a cast type (see
comments in code).

llvm-svn: 76719
2009-07-22 04:23:20 +00:00
Chris Lattner 6bad1376a2 fix some formatting stuff, patch by Edward O'Callaghan!
llvm-svn: 76718
2009-07-22 04:21:40 +00:00
Mon P Wang acedf7768f Preserve address space information through member accesses, e.g.,
__attribute__((address_space(1))) struct {int arr[ 3 ]; }  *p1;
   ... = p1->arr[2];  // load from address space 1

llvm-svn: 76717
2009-07-22 03:08:17 +00:00
Mike Stump 18366cbe97 Remove an unneeded header.
llvm-svn: 76716
2009-07-22 01:39:14 +00:00
Eric Christopher 394dfd2998 Remove intrinsic support for __builtin_ia32_vec_set_v16qi and
__builtin_ia32_vec_set_v4si as these should be lowered in the
front-end to inserts.

llvm-svn: 76714
2009-07-22 01:11:48 +00:00
Eli Friedman caccc0081a Add support for MMX VSETCC.
llvm-svn: 76713
2009-07-22 01:06:52 +00:00
Sean Callanan 5e4755943e Added the unconditional JMP with an 8-bit relocation for the
assembler / disassembler.

llvm-svn: 76712
2009-07-22 01:05:20 +00:00
Evan Cheng c7a243dfdd Add an entry.
llvm-svn: 76711
2009-07-22 00:58:27 +00:00
Chris Lattner fd164b863f inline the two MergeableConstSection implementations into their
only caller.

llvm-svn: 76710
2009-07-22 00:47:11 +00:00
Mike Stump 753d120975 Prep for new warning.
llvm-svn: 76709
2009-07-22 00:43:08 +00:00
Fariborz Jahanian 891436d54c Minor mod. per Doug's comment.
llvm-svn: 76708
2009-07-22 00:42:46 +00:00
Chris Lattner 8ebaec6b27 set the ELF "small" flag on objects that end up in .rodata.cst4 consistently,
updating a mips testcase to expect it.

llvm-svn: 76707
2009-07-22 00:41:56 +00:00
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