Commit Graph

64815 Commits

Author SHA1 Message Date
Daniel Dunbar 6cfaa47c85 lit: Catch (internal) exceptions when using --no-sh.
llvm-svn: 77830
2009-08-01 23:18:27 +00:00
Eli Friedman 62561fe9b0 Fix a minor issue with unions in the new struct building code.
llvm-svn: 77829
2009-08-01 23:11:24 +00:00
Daniel Dunbar 5a283bf848 lit: Fix thinko in finding config file.
llvm-svn: 77828
2009-08-01 23:09:12 +00:00
Chris Lattner 84b453aca4 .rdata == .rodata on mips.
llvm-svn: 77827
2009-08-01 23:07:29 +00:00
Chris Lattner b1a3309a18 no need to override the default with the default.
llvm-svn: 77826
2009-08-01 23:05:25 +00:00
Chris Lattner 5038edb3ee one fewer license, yay. :)
llvm-svn: 77824
2009-08-01 22:54:39 +00:00
Chris Lattner 37d60ffce0 eXtensible Systems doesn't exist any more and Reid donated this to the
project under the normal license, yay. :)

llvm-svn: 77823
2009-08-01 22:54:17 +00:00
Chris Lattner 61990958d8 loweringinfo is always non-null.
llvm-svn: 77821
2009-08-01 22:48:40 +00:00
Chris Lattner b2bbb61f33 REmove dead fields of TAI.
llvm-svn: 77820
2009-08-01 22:40:22 +00:00
Chris Lattner b4b1012d29 fix a problem Eli noticed where we would compile the attached ptrtoint
to:

.quad X

even on a 32-bit system, where X is not 64-bits.  There isn't much that
we can do here, so we just print:

.quad	((X) & 4294967295)

instead.

llvm-svn: 77818
2009-08-01 22:25:12 +00:00
Chris Lattner 5aa4952625 update for rename
llvm-svn: 77817
2009-08-01 22:06:53 +00:00
Chris Lattner d5c01136ef fix a fixme by sinking various target-specific directives down into
the appropriate subclasses.

llvm-svn: 77815
2009-08-01 21:56:13 +00:00
Chris Lattner 286326ed24 coff also doesn't have a ReadOnlySection yet, (!)
llvm-svn: 77814
2009-08-01 21:49:24 +00:00
Chris Lattner bc3d5f5db0 coff doesn't set a .bss seciton, so this is dead.
llvm-svn: 77813
2009-08-01 21:48:25 +00:00
Chris Lattner 26fb277f92 it turns out that isWeak() was basically dead anyway. Kill off SectionInfo :-/
llvm-svn: 77812
2009-08-01 21:46:23 +00:00
Eli Friedman 881f9a89d1 Additional AuroraUX header path.
llvm-svn: 77811
2009-08-01 21:46:03 +00:00
Chris Lattner 72c3e7746f don't use isWeak anymore.
llvm-svn: 77810
2009-08-01 21:42:58 +00:00
Chris Lattner 9ba71d12d8 fix a layering violation by moving SectionKind out to its own header.
llvm-svn: 77808
2009-08-01 21:30:49 +00:00
Dan Gohman a152345dfb Minor whitespace tidiness.
llvm-svn: 77807
2009-08-01 21:25:46 +00:00
Dan Gohman 9139b02cda Fix typos in comments.
llvm-svn: 77806
2009-08-01 21:25:00 +00:00
Chris Lattner fba48fbfdd with the previous refactoring, fixme fixed!
llvm-svn: 77805
2009-08-01 21:21:43 +00:00
Chris Lattner a61c05adc0 update for API change.
llvm-svn: 77804
2009-08-01 21:14:30 +00:00
Chris Lattner c9c277ba0f Change SectionKind to be a property that is true of a *section*, it
should have no state that is specific to particular globals in the
section.  In this case, it means the removal of the "isWeak" and
"ExplicitSection" bits.  MCSection uses the new form of SectionKind.

To handle isWeak, I introduced a new SectionInfo class, which is
SectionKind + isWeak, and it is used by the part of the code generator
that does classification of a specific global.

The ExplicitSection disappears.  It is moved onto MCSection as a new
"IsDirective" bit.  Since the Name of a section is either a section
or directive, it makes sense to keep this bit in MCSection.  Ultimately
the creator of MCSection should canonicalize (e.g.) .text to whatever
the actual section is.

llvm-svn: 77803
2009-08-01 21:11:14 +00:00
Eli Friedman e480ce3d29 Don't error on C++ linkage; if we don't support that, there are
serious issues :)

llvm-svn: 77800
2009-08-01 20:48:04 +00:00
Chris Lattner 6778f1f368 add a note about the build bots
llvm-svn: 77796
2009-08-01 19:25:25 +00:00
Dan Gohman c278621694 Minor code cleanups.
llvm-svn: 77795
2009-08-01 19:14:37 +00:00
Dan Gohman 3a9b9a59ea Print the target flags as an int instead of a char, as they aren't
actually characters.

llvm-svn: 77794
2009-08-01 19:13:38 +00:00
Dan Gohman 27f169c416 Use the default copy ctor and copy-assignment operators.
llvm-svn: 77793
2009-08-01 19:11:31 +00:00
Dan Gohman 9023fd2b2a Add nounwind to this test.
llvm-svn: 77792
2009-08-01 19:11:04 +00:00
Nick Lewycky 04e3a30a21 Add newline at end of file to remove gcc warning.
llvm-svn: 77791
2009-08-01 19:09:44 +00:00
Benjamin Kramer c10898ce3e Remove now empty unit test directory.
llvm-svn: 77790
2009-08-01 19:07:29 +00:00
Chris Lattner fb1b51c2ed daniel says it's fine to nuke this.
llvm-svn: 77789
2009-08-01 18:38:21 +00:00
Chris Lattner 41a866d30d update for new api
llvm-svn: 77788
2009-08-01 18:35:49 +00:00
Chris Lattner 95bad379a9 All MCSections are now required to have a SectionKind.
llvm-svn: 77787
2009-08-01 18:25:49 +00:00
Eli Friedman 2e6da95a60 Add temp C++ include path for AuroraUX; patch by Edward O'Callaghan.
llvm-svn: 77786
2009-08-01 17:10:21 +00:00
Eli Friedman f165160724 Hack to make this test work on platforms which aren't Macs. Fixing this
myself because I'm getting tired of seeing the red buildbots, which have 
been red since 5:30PM PDT last night.

Proposed supplement to developer policy: committers should make sure to 
be around to watch for buildbot failures after committing.

llvm-svn: 77785
2009-08-01 16:37:18 +00:00
Daniel Dunbar 590c358681 lit: Add internal script execution.
- Off by default, you can test it with the --no-sh argument.

 - For me it works for all but 3 tests, but there a number of FIXMEs and QOI
   issues:  
     o Redirection isn't completely accurate -- in practice it can't portably
       be, but I would like to error out if someone writes something which isn't
       going to work. This is the source of the 3 test failures.

     o Some pipe configurations have the potential to deadlock.

     o It is significantly slower when multithreaded. I believe this is due to
       locking happening under the hood, there is probably some kind of solution
       but I haven't investigated yet.

     o Log output is ugly.

llvm-svn: 77784
2009-08-01 10:18:01 +00:00
Daniel Dunbar 82fa6f5e9d lit: Two more sh lex/parse bugs (but its so simple!)
- Empty arguments weren't handled correctly.
 - Escapes outside quoted strings weren't handled.

llvm-svn: 77783
2009-08-01 09:41:09 +00:00
Ted Kremenek 1f22aa7433 This is a fairly large patch, which resulted from a cascade of changes
made to RegionStore (and related classes) in order to handle some
analyzer failures involving casts and manipulation of symbolic memory.

The root of the change is in StoreManager::CastRegion().  Instead of
using ad hoc heuristics to decide when to layer an ElementRegion on a
casted MemRegion, we now always layer an ElementRegion when the cast
type is different than the original type of the region.  This carries
the current cast information associated with a region around without
resorting to the error prone recording of "casted types" in GRState.

Along with this new policy of layering ElementRegions, I added a new
algorithm to strip away existing ElementRegions when they simply
represented casts of a base memory object.  This algorithm computes
the raw "byte offset" that an ElementRegion represents from the base
region, and allows the new ElementRegion to be based off that offset.
The added benefit is that this naturally handles a series of casts of
a MemRegion without building up a set of redundant ElementRegions
(thus canonicalizing the region view).

Other related changes that cascaded from this one (as tests were
failing in RegionStore):

- Revamped RegionStoreManager::InvalidateRegion() to completely remove
  all bindings and default values from a region and all subregions.
  Now invalidated fields are not bound directly to new symbolic
  values; instead the base region has a "default" symbol value from
  which "derived symbols" can be created.  The main advantage of this
  approach is that it allows us to invalidate a region hierarchy and
  then lazily instantiate new values no matter how deep the hierarchy
  went (i.e., regardless of the number of field accesses,
  e.g. x->f->y->z->...).  The previous approach did not do this.

- Slightly reworked RegionStoreManager::RemoveDeadBindings() to also
  incorporate live symbols and live regions that do not have direct
  bindings but also have "default values" used for lazy instantiation.
  The changes to 'InvalidateRegion' revealed that these were necessary
  in order to achieve lazy instantiation of values in the region store
  with those bindings being removed too early.

- The changes to InvalidateRegion() and RemoveDeadBindings() revealed
  a serious bug in 'getSubRegionMap()' where not all region -> subregion
  relationships involved in actually bindings (explicit and implicit)
  were being recorded.  This has been fixed by using a worklist algorithm
  to iteratively fill in the region map.

- Added special support to RegionStoreManager::Bind()/Retrieve() to handle
  OSAtomicCompareAndSwap in light of the new 'CastRegion' changes and the
  layering of ElementRegions.

- Fixed a bug in SymbolReaper::isLive() where derived symbols were not
  being marked live if the symbol they were derived from was also live.
  This fix was critical for getting lazy instantiation in RegionStore
  to work.

- Tidied up the implementation of ValueManager::getXXXSymbolVal() methods
  to use SymbolManager::canSymbolicate() to decide whether or not a
  symbol should be symbolicated.

- 'test/Analysis/misc-ps-xfail.m' now passes; that test case has been
  moved to 'test/Analysis/misc-ps.m'.

- Tweaked some pretty-printing of MemRegions, and implemented
  'ElementRegion::getRawOffset()' for use with the CastRegion changes.

llvm-svn: 77782
2009-08-01 06:17:29 +00:00
Evan Cheng e64f48ba8b Workaround a couple of Darwin assembler bugs.
llvm-svn: 77781
2009-08-01 06:13:52 +00:00
Daniel Dunbar 769f940655 Ok, ok, I give in. Fix tests for unused result warning.
llvm-svn: 77780
2009-08-01 06:07:15 +00:00
Ted Kremenek eb01ba670e Temporarily disable out-of-bounds checking. The current checking logic will not work quite right with the changes I'm about to commit.
llvm-svn: 77779
2009-08-01 05:59:39 +00:00
Daniel Dunbar b616260624 Use %S, not `pwd`, and enable a line that *does* work.
- Doug, please check.

llvm-svn: 77778
2009-08-01 05:57:38 +00:00
Daniel Dunbar 1661066e58 lit: Fix two sh lexing bugs.
- '\\\\' inside a "..." string becomes '\\'.
 - The '<' token wasn't being recognized.

llvm-svn: 77777
2009-08-01 05:52:04 +00:00
Daniel Dunbar e65f4de30d 'unset' isn't needed in these tests anymore, we always run with a controlled
environment.

llvm-svn: 77776
2009-08-01 04:51:30 +00:00
Dan Gohman c120612daa Give MachineFunctionAnalysis a destructor so it can verify that
that it released its allocated memory.

llvm-svn: 77775
2009-08-01 04:19:43 +00:00
Dan Gohman 859103d8e7 Delete a redundant variable.
llvm-svn: 77774
2009-08-01 04:18:29 +00:00
Daniel Dunbar dc4a0f7427 lit: Fix a name lookup problem, which only occurred on a race condition. This is
why dynamic binding sucks.

llvm-svn: 77773
2009-08-01 04:11:36 +00:00
Daniel Dunbar 3ee0543e67 lit: Pull a few more variables into the TestingConfig object.
llvm-svn: 77772
2009-08-01 04:06:02 +00:00
Dan Gohman 7153692bdf Minor code simplifications.
llvm-svn: 77769
2009-08-01 03:51:09 +00:00