Commit Graph

52120 Commits

Author SHA1 Message Date
Duncan Sands c7affb0a8f Load tracking means that the value analyzed may
not have pointer type.  In particular, it may
be the condition argument for a select or a GEP
index.  While I was unable to construct a testcase
for which some bits of the original pointer are
captured due to one of these, it's very very close
to being possible - so play safe and exclude these
possibilities.

llvm-svn: 61580
2009-01-02 15:16:38 +00:00
Nuno Lopes 533eac8204 fist short at a new unit test for ImmutableSets. no bugs found, though :P
llvm-svn: 61576
2009-01-02 13:49:50 +00:00
Nuno Lopes 69a8b01efe make 'make clean' remove test binaries as well
llvm-svn: 61572
2009-01-02 12:25:22 +00:00
Nuno Lopes cb3c839574 ignore build dirs
llvm-svn: 61571
2009-01-02 12:18:41 +00:00
Duncan Sands b193a37cd3 When calculating 'nocapture' argument attributes, allow
the argument to be stored to an alloca by tracking uses
of the alloca.  This occurs 4 times (out of 7121, 0.05%)
in MultiSource/Applications, so may not be worth it.  On
the other hand, it is easy to do and fairly cheap.  The
functions it helps are: W_addcom and W_addlit in spiff;
process_args (argv) in d (make_dparser); ercPixConcealIMB
in JM/ldecod.

llvm-svn: 61570
2009-01-02 11:54:37 +00:00
Duncan Sands cefc8604aa Improve comments and reorganize a bit - no functionality
change.

llvm-svn: 61569
2009-01-02 11:46:24 +00:00
Duncan Sands 3a4522e290 Deleted too many properties: restore some.
llvm-svn: 61567
2009-01-02 09:01:57 +00:00
Chris Lattner 59d0e3bc2e Fix a really horrible typo, which caused undefined behavior.
llvm-svn: 61566
2009-01-02 08:49:06 +00:00
Duncan Sands c70d0ce301 Remove the "ignore" property on this directory.
llvm-svn: 61565
2009-01-02 08:40:06 +00:00
Chris Lattner 3822f63b88 minor cleanups and comment improvements.
llvm-svn: 61564
2009-01-02 08:05:26 +00:00
Chris Lattner 2346a9eb99 add a #include to hopefully get the x86-64-linux buildbot building.
llvm-svn: 61563
2009-01-02 07:18:46 +00:00
Chris Lattner 814d9eec97 Remove lex/bison support from makefile.rules.
llvm-svn: 61562
2009-01-02 07:16:45 +00:00
Chris Lattner 7c2dcf0aab update the cmakefile. This is a "best guess", I haven't tested this.
llvm-svn: 61561
2009-01-02 07:14:23 +00:00
Chris Lattner b7481cfcdf lex and bison aren't needed to build llvm anymore.
llvm-svn: 61560
2009-01-02 07:10:51 +00:00
Chris Lattner 8730c6d46c new non-ambiguous syntax.
llvm-svn: 61559
2009-01-02 07:02:56 +00:00
Chris Lattner ac161bff07 Reimplement the old and horrible bison parser for .ll files with a nice
and clean recursive descent parser.

This change has a couple of ramifications:
1. The parser code is about 400 lines shorter (in what we maintain, not
   including what is autogenerated).
2. The code should be significantly faster than the old code because we 
   don't have to work around bison's poor handling of datatypes with 
   ctors/dtors.  This also makes the code much more resistant to memory 
   leaks.
3. We now get caret diagnostics from the .ll parser, woo.
4. The actual diagnostics emited from the parser are completely different
   so a bunch of testcases had to be updated.
5. I now disallow "%ty = type opaque %ty = type i32".  There was no good
   reason to support this, it was just an accident of the old 
   implementation.  I have no reason to think that anyone is actually using
   this.
6. The syntax for sticking a global variable has changed to make it 
   unambiguous.  I don't think anyone is depending on this since only clang
   supports this and it is not solid yet, so I'm not worried about anything
   breaking.
7. This gets rid of the last use of bison, and along with it the .cvs files.
   I'll prune this from the makefiles as a subsequent commit.

There are a few minor cleanups that can be done after this commit (suggestions
welcome!) but this passes dejagnu testing and is ready for its time in the
limelight.

llvm-svn: 61558
2009-01-02 07:01:27 +00:00
Evan Cheng 4c91aa3418 Do not isel load folding bt instructions for pentium m, core, core2, and AMD processors. These are significantly slower than a load followed by a bt of a register.
llvm-svn: 61557
2009-01-02 05:35:45 +00:00
Evan Cheng 13f3a33f44 Fix x86 CPU id detection to identify Penryn (and future processors).
llvm-svn: 61556
2009-01-02 05:29:20 +00:00
Evan Cheng 1671a309fd Use movaps / movd to extract vector element 0 even with sse4.1. It's still cheaper than pextrw especially if the value is in memory.
llvm-svn: 61555
2009-01-02 05:29:08 +00:00
Nick Lewycky a17dfcd58a Fix typo.
llvm-svn: 61554
2009-01-02 05:01:22 +00:00
Nick Lewycky 0cfba9c6bf Remove the cyclic part of this test, it was passing for the wrong
reason. Two functions which mutually require each other to be nocapture 
are not currently supported.

llvm-svn: 61553
2009-01-02 03:52:27 +00:00
Nick Lewycky 7e82055e88 Make adding nocapture a bit stronger. FreeInst is nocapture. Also,
functions that don't write can't leak a pointer except through 
the return value, so a void readonly function is implicitly nocapture.

Test these, and add a test that verifies that f1 calling f2 with an 
otherwise dead pointer gets both of them marked nocapture.

llvm-svn: 61552
2009-01-02 03:46:56 +00:00
Bill Wendling ea58ff5a8a Don't error out if ranlib fails.
llvm-svn: 61551
2009-01-02 02:53:24 +00:00
Chris Lattner 836dd95506 rename a file to follow naming conventions.
llvm-svn: 61550
2009-01-02 01:52:35 +00:00
Duncan Sands 8c03a123ce Add tests for two types of traps that escape analysis
might one day fall into.

llvm-svn: 61549
2009-01-02 00:55:51 +00:00
Duncan Sands 1f11d2bbc1 Mention that this pass does escape analysis in the
leading comments.

llvm-svn: 61548
2009-01-01 20:45:19 +00:00
Duncan Sands 953c9c2fbc Factorize (and generalize) the code promoting SELECT
and BRCOND conditions.  Reorder a few methods while
there.

llvm-svn: 61547
2009-01-01 20:36:20 +00:00
Misha Brukman 36daf0d1c7 * Quoted the executable 'runtest' to emphasize the binary needed;
otherwise, some unlucky souls start looking for a 'dejagnu' binary...
* Properly capitalized LLVM.

llvm-svn: 61546
2009-01-01 20:26:05 +00:00
Duncan Sands 19ee60848a Remove trailing spaces.
llvm-svn: 61545
2009-01-01 19:56:02 +00:00
Duncan Sands 8feb694e8f Fix PR3274: when promoting the condition of a BRCOND node,
promote from i1 all the way up to the canonical SetCC type.
In order to discover an appropriate type to use, pass
MVT::Other to getSetCCResultType.  In order to be able to
do this, change getSetCCResultType to take a type as an
argument, not a value (this is also more logical).

llvm-svn: 61542
2009-01-01 15:52:00 +00:00
Misha Brukman bcf15388ab Original patch by Talin.
* Added the first LLVM unittest -- DenseMap.
* Updated mkpatch utility to include llvm/unittests dir
* Added top-level target "unittests" to run all unittests

llvm-svn: 61541
2009-01-01 02:24:48 +00:00
Misha Brukman 22df200727 * Removed gtest-all.cc; .cc files including other .cc files is weird
* Removed gtest_main.cc: we have our own main() elsewhere
* Simplified the Makefile as we don't need SOURCES

* Moved the internal header to gtest/internal/
* Simplified the Makefile to remove -I param to CPP.Flags

* Updated README.LLVM with all the steps I took to massage GTest to
  work in LLVM so far

llvm-svn: 61540
2009-01-01 02:05:43 +00:00
Misha Brukman 922e34993a Moved Google Test code up one directory so that we can use a standard LLVM
Makefile with it, without resorting to the use of VPATH.

Also added Makefiles at every level of the directory tree to properly recurse
to Google Test and build it as a library (original Makefiles by Talin).

llvm-svn: 61539
2009-01-01 01:29:44 +00:00
Bill Wendling 0fcff2c203 Fix comment.
llvm-svn: 61538
2009-01-01 01:19:59 +00:00
Bill Wendling aedb54a947 Add transformation:
xor (or (icmp, icmp), true) -> and(icmp, icmp)

This is possible because of De Morgan's law.

llvm-svn: 61537
2009-01-01 01:18:23 +00:00
Bill Wendling 4f8b265825 Some compilers are picky about accessing the first element of a std::vector if
there's nothing in the vector. Pacify them.

llvm-svn: 61536
2009-01-01 01:14:31 +00:00
Duncan Sands 163848021b Look through phi nodes and select instructions when
calculating nocapture attributes.

llvm-svn: 61535
2008-12-31 20:21:34 +00:00
Bill Wendling be504e82bc Rename AddReadAttrs to FunctionAttrs. This is related to Duncan's patch r61525.
llvm-svn: 61534
2008-12-31 19:51:31 +00:00
Bill Wendling 15a47ddf40 This is not failing on Darwin for some reason. XFAIL for other platforms.
llvm-svn: 61533
2008-12-31 19:26:09 +00:00
Duncan Sands df128eb477 Don't analyze arguments already marked 'nocapture'.
llvm-svn: 61532
2008-12-31 18:08:59 +00:00
Misha Brukman 5347fb20ad Fixed grammar and capitalization.
llvm-svn: 61531
2008-12-31 17:44:36 +00:00
Misha Brukman b132910b8f Add spacing between type and variable name.
llvm-svn: 61530
2008-12-31 17:41:49 +00:00
Misha Brukman 93b7c4085b Comment headers should extend to 80 chars.
llvm-svn: 61529
2008-12-31 17:40:52 +00:00
Misha Brukman d07751e5d8 Fix spacing to be uniform for parameters.
llvm-svn: 61528
2008-12-31 17:39:58 +00:00
Misha Brukman bbfefd9612 Removed extra spaces.
llvm-svn: 61527
2008-12-31 17:38:27 +00:00
Misha Brukman c89aba332f Import of Google Test 1.2.1, with the non-essential bits removed.
Added a README.LLVM file to indicate which files and directories
were removed from the original source tarball.

llvm-svn: 61526
2008-12-31 17:34:06 +00:00
Duncan Sands 44c8cd97a5 Rename AddReadAttrs to FunctionAttrs, and teach it how
to work out (in a very simplistic way) which function
arguments (pointer arguments only) are only dereferenced
and so do not escape.  Mark such arguments 'nocapture'.

llvm-svn: 61525
2008-12-31 16:14:43 +00:00
Oscar Fuentes 2cc3ce0002 CMake: Added some VC++ specific info to CMake.html.
llvm-svn: 61521
2008-12-31 14:36:41 +00:00
Chris Lattner 9dd5e9e4ae Add a new Attribute::getAlignmentFromAttrs method.
llvm-svn: 61517
2008-12-31 08:41:38 +00:00
Bill Wendling 80cb99575e XFAIL test caused by r61493. Apparently, this is expected?
llvm-svn: 61516
2008-12-31 08:26:55 +00:00