Commit Graph

59194 Commits

Author SHA1 Message Date
Eli Friedman 33955dd28f Remove unnecessary push_back (at least, I think it's unnecessary);
hopefully, this fixes PR4144 without any regressions.

llvm-svn: 70823
2009-05-04 04:12:48 +00:00
Daniel Dunbar 98ba964e5c Don't allow clients to traverse into superclass synthesized properties
via CollectObjCIvars.
 - In places where we need them, we should have the implementation and
   access the properties through it.

This is a fairly substantial functionality change: 
 1. @encode no longer encodes synthesized ivars, ever.

 2. The ivar layout bitmap no longer encodes information for
    synthesized ivars in superclasses. Well, actually I had already
    broken that, but it is intentional now.

We are now differing substantially from llvm-gcc and gcc
here. However, in my opinion this fundamentally *must* work if
non-fragile classes are to work. Without this change, the result of
@encode and the ivar layout depend on the order that the
implementation is seen in a file (if it is in the same file with its
superclass). Since both scenarios should work the same, our behavior
is now consistent with gcc behavior as if an implementation is never
seen following an implementation of its superclass.

Note that #2 is only a functionality change when (A) an
implementation appears in the same translation unit with the
implementation of its superclass, and (B) the superclass has
synthesized ivars. My belief is that this situation does not occur in
practice.

I am not yet sure of the role/semantics of @encode when synthesized
ivars are present... it's use is fairly unsound in a non-fragile world.

llvm-svn: 70822
2009-05-04 04:10:48 +00:00
Evan Cheng 3f77805642 Make sure to color with only allocatable registers for the specific register class.
llvm-svn: 70821
2009-05-04 03:30:11 +00:00
Chris Lattner d579cb1167 * Sink 4 duplicates of edge threading validity checks and DOUT prints into
ThreadEdge directly.  This shares the code, but is just a refactoring.
* Make JumpThreading compute the set of loop headers and avoid threading
  across them.  This prevents jump threading from forming irreducible 
  loops (goodness) but also prevents it from threading in other cases that
  are beneficial (see the comment above FindFunctionBackedges).

llvm-svn: 70820
2009-05-04 02:28:08 +00:00
Chris Lattner 351134ba93 Factor loop backedge finding out of CodeGenPrepare into a new
FindFunctionBackedges function.

llvm-svn: 70819
2009-05-04 02:25:58 +00:00
Daniel Dunbar d8b7f8e7cf Set COLUMNS=0 to disable wrapping instead of a random large number.
llvm-svn: 70818
2009-05-04 02:20:01 +00:00
Chris Lattner 0fc8a35fb8 add a range insertion method to SmallSet.
llvm-svn: 70817
2009-05-04 02:19:15 +00:00
Daniel Dunbar 4ddeb20743 Test a few more bits of the driver.
llvm-svn: 70816
2009-05-04 00:31:11 +00:00
Evan Cheng 4b6072bcb8 The stack slots which share the same stack slot after coloring can, but do not have to, use the same register. In fact, they each may have different register class requirements.
llvm-svn: 70815
2009-05-04 00:24:50 +00:00
Daniel Dunbar 032dc63cd4 Nightly test coverage reporting is back online.
llvm-svn: 70814
2009-05-03 23:46:18 +00:00
Daniel Dunbar 62b1070fa2 Inline GetFieldBaseOffset into sole callsite.
llvm-svn: 70813
2009-05-03 23:35:23 +00:00
Daniel Dunbar 5b743915c3 Avoid recomputing field offsets.
llvm-svn: 70812
2009-05-03 23:31:46 +00:00
Argyrios Kyrtzidis 79be34012f Revert r70803 for now, it causes a regression.
llvm-svn: 70811
2009-05-03 23:27:19 +00:00
Daniel Dunbar d22aa4a5e5 Normalize formatting
llvm-svn: 70810
2009-05-03 23:21:22 +00:00
Daniel Dunbar ea6dff3744 Make diagnostic printing more deterministic when running tests.
llvm-svn: 70809
2009-05-03 23:14:36 +00:00
Daniel Dunbar b5bd4eaa10 svn:ignore Debug+Coverage dirs
llvm-svn: 70808
2009-05-03 23:11:22 +00:00
Daniel Dunbar 6f9499188c Fix an infinite loop in diagnostic printing.
- The diagnostic is still poor, however. Doug, can you investigate?

 - Improved the test case to not depend on the file name, now it can
   be extended to actually check the formatting of the diagnostics
   (I'm hoping grep -A is portable here).

llvm-svn: 70807
2009-05-03 23:04:40 +00:00
Eli Friedman 7df3447c10 Fix for PR3841: follow gcc's example and fall back to the system
stdint.h unless we are freestanding.

Any suggestions here are welcome.

llvm-svn: 70806
2009-05-03 23:00:48 +00:00
Eli Friedman b8c4fd8cfd PR2524: downgrade taking address of expression of type 'void' to an
extension warning.

llvm-svn: 70805
2009-05-03 22:36:05 +00:00
Argyrios Kyrtzidis ba49fef34a Remove an, apparently, leftover MachineModuleInfo::RecordSourceLine declaration.
llvm-svn: 70804
2009-05-03 22:11:08 +00:00
Argyrios Kyrtzidis ce7196b903 -Remove the DwarfWriter::RecordSourceLine calls from the instruction selectors.
-Depend on DebugLocs for source line info.

llvm-svn: 70803
2009-05-03 22:03:35 +00:00
Eli Friedman 8469bc7c73 Fix/re-enable test.
llvm-svn: 70800
2009-05-03 21:22:18 +00:00
Daniel Dunbar 110c800cee Disable this test case, I'm tired of seeing red. :)
llvm-svn: 70799
2009-05-03 21:10:32 +00:00
Daniel Dunbar 36e2a1eea3 Use the implementation decl for looking up offset while building the
ivar layout.
 - The layout needs access to synthesized ivars.

llvm-svn: 70798
2009-05-03 21:05:10 +00:00
Daniel Dunbar e4eeb07acd Rename test case
llvm-svn: 70797
2009-05-03 20:37:42 +00:00
Eli Friedman 426056acf2 Fix the testcase for PR4132.
llvm-svn: 70796
2009-05-03 19:54:21 +00:00
Ted Kremenek 055797b789 Add RegionStore test that illustrates a bogus array-out-of-bounds error.
llvm-svn: 70795
2009-05-03 19:24:34 +00:00
Eli Friedman 5b73b5e197 PR4134: Implement __builtin_extract_return_addr.
llvm-svn: 70794
2009-05-03 19:23:23 +00:00
Eli Friedman 2f621b72f4 Fix for PR4132: make sure to insert whitespace consistently before a
pasted token.

llvm-svn: 70793
2009-05-03 19:16:00 +00:00
Evan Cheng 1de5cf548e Typo.
llvm-svn: 70792
2009-05-03 19:10:11 +00:00
Ted Kremenek 3f4e62f397 Add failing test case.
llvm-svn: 70791
2009-05-03 19:09:37 +00:00
Chris Lattner 680ae74885 Remove obsolete wording, the only exception a readnone function can throw
is the empty set. :)  Thanks to Fritz for pointing this out.

llvm-svn: 70790
2009-05-03 19:06:00 +00:00
Eli Friedman 5a3b1b0f7a Fix comment to account for r70786.
llvm-svn: 70789
2009-05-03 19:01:39 +00:00
Chris Lattner f031421afe be very explicit that readnone/readonly functions can't
throw exceptions.

llvm-svn: 70788
2009-05-03 18:49:37 +00:00
Evan Cheng 210fc62a91 In some rare cases, the register allocator can spill registers but end up not utilizing registers at all. The fundamental problem is linearscan's backtracking can end up freeing more than one allocated registers. However, reloads and restores might be folded into uses / defs and freed registers might not be used at all.
VirtRegMap keeps track of allocations so it knows what's not used. As a horrible hack, the stack coloring can color spill slots with *free* registers. That is, it replace reload and spills with copies from and to the free register. It unfold instructions that load and store the spill slot and replace them with register using variants.

Not yet enabled. This is part 1. More coming.

llvm-svn: 70787
2009-05-03 18:32:42 +00:00
Eli Friedman c0042d804c PR4133: fix always_inline implementation to be consistent with gcc.
llvm-svn: 70786
2009-05-03 18:13:43 +00:00
Anders Carlsson 1619a5041c Make codegen for constructors work again.
llvm-svn: 70785
2009-05-03 17:47:16 +00:00
Douglas Gregor f9aa5260a9 One can use "class" and "struct" interchangeably to refer to a class
in C++. Fixes <rdar://problem/6815995>.

llvm-svn: 70784
2009-05-03 17:18:57 +00:00
Anders Carlsson 4c78596182 assert that mangleName is not called for C++ ctors/dtors.
llvm-svn: 70783
2009-05-03 16:51:04 +00:00
Anton Korobeynikov 4ff60e0cc2 Handle implicit zext in a better way. Shamelessly stolen from x86 backend.
Thanks for Dan Gohman for suggestion!

llvm-svn: 70782
2009-05-03 15:50:18 +00:00
Douglas Gregor cb5166211f Fix crash in source-line truncation code for diagnostic
printing. Also, when we only need to truncate the line at the end,
make sure there is room for the ellipsis.

llvm-svn: 70781
2009-05-03 15:24:25 +00:00
Daniel Dunbar e49e9c3a52 Remove ASTContext::addRecordToClass.
llvm-svn: 70780
2009-05-03 14:27:48 +00:00
Daniel Dunbar 3434d492b3 It turns out BuildAggrIvarLayout wasn't even using the shadow struct,
just computing it!

llvm-svn: 70779
2009-05-03 14:22:14 +00:00
Daniel Dunbar 94f46dc056 Lift common subexpression, remove dead "base" variable.
llvm-svn: 70778
2009-05-03 14:17:18 +00:00
Daniel Dunbar 15bd88860c Factor out BuildAggrIvarRecordLayout routine.
llvm-svn: 70777
2009-05-03 14:10:34 +00:00
Daniel Dunbar 7abf83cc86 Lift out GetGCAttrTypeForType routine.
llvm-svn: 70776
2009-05-03 13:55:09 +00:00
Daniel Dunbar 7b89ace186 Add constructors for GC_IVAR and SKIP_SCAN, tighten up uses.
Lift up a size calculation and note some asymmetries.

llvm-svn: 70775
2009-05-03 13:44:42 +00:00
Anton Korobeynikov a0f5437c03 Hook msp430 in
llvm-svn: 70774
2009-05-03 13:43:08 +00:00
Anton Korobeynikov 9d026dd985 Whitespace cleanup
llvm-svn: 70773
2009-05-03 13:42:53 +00:00
Anton Korobeynikov 9173b49435 Regenerate
llvm-svn: 70772
2009-05-03 13:42:23 +00:00