Commit Graph

218 Commits

Author SHA1 Message Date
Devang Patel 16e5124a82 Do not use abbrev while writing NamedMDNode name.
llvm-svn: 77637
2009-07-30 23:06:35 +00:00
Devang Patel 27c87fff7f Read and write NamedMDNode.
llvm-svn: 77517
2009-07-29 22:34:41 +00:00
Devang Patel e059ba6ed2 Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
llvm-svn: 76834
2009-07-23 01:07:34 +00:00
Devang Patel 75bec765c3 Remove empty test.
llvm-svn: 76763
2009-07-22 18:09:11 +00:00
Devang Patel 7428d8acec Introduce MetadataBase, a base class for MDString and MDNode.
Derive MDString directly from MetadataBase. 
Introduce new bitcode block to hold metadata.

llvm-svn: 76759
2009-07-22 17:43:22 +00:00
Devang Patel f04d63a398 Drop "constant" from
!0 = constant metadata !{...}

llvm-svn: 75057
2009-07-08 21:57:07 +00:00
Devang Patel 983c6b1b8f Update SLotTracker to handle MDNode slots.
Simplify MDNode printing.

llvm-svn: 75053
2009-07-08 21:44:25 +00:00
Devang Patel d2541158da Support MDNode forward reference.
llvm-svn: 75031
2009-07-08 19:23:54 +00:00
Devang Patel 461f2bdcbe new test case
llvm-svn: 74633
2009-07-01 19:40:59 +00:00
Devang Patel 39e64d452a Support stand alone metadata syntax.
!0 = constant metadata !{i32 21, i32 22}
@llvm.blah = constant metadata !{i32 1000, i16 200, metadata !0}

llvm-svn: 74630
2009-07-01 19:21:12 +00:00
Devang Patel 2cc6d183b2 Let's ignore MDStrings also!
llvm-svn: 74255
2009-06-26 02:26:12 +00:00
Devang Patel 9d68302e48 No need to code gen MDNodes
llvm-svn: 74150
2009-06-25 00:47:42 +00:00
Dan Gohman 7ccc52f131 Support vector casts in more places, fixing a variety of assertion
failures.

To support this, add some utility functions to Type to help support
vector/scalar-independent code. Change ConstantInt::get and
ConstantFP::get to support vector types, and add an overload to
ConstantInt::get that uses a static IntegerType type, for
convenience.

Introduce a new getConstant method for ScalarEvolution, to simplify
common use cases.

llvm-svn: 73431
2009-06-15 22:12:54 +00:00
Dan Gohman a5b9645c4b Split the Add, Sub, and Mul instruction opcodes into separate
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.

For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.

This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt

llvm-svn: 72897
2009-06-04 22:49:04 +00:00
Nick Lewycky adbc284666 Give embedded metadata its own type instead of relying on EmptyStructTy.
llvm-svn: 72610
2009-05-30 05:06:04 +00:00
Nick Lewycky b8f9b7a965 Make MDNode use CallbackVH. Also change MDNode to store Value* instead of
Constant* in preperation of a future change to support holding non-Constants
in an MDNode.

llvm-svn: 71407
2009-05-10 20:57:05 +00:00
Nick Lewycky 49f891958f Add support for embedded metadata to LLVM. This introduces two new types of
Constant, MDString and MDNode which can only be used by globals with a name
that starts with "llvm." or as arguments to a function with the same naming
restriction.

llvm-svn: 68420
2009-04-04 07:22:01 +00:00
Duncan Sands a09e0afe74 Don't load values out of global constants with weak
linkage: the value may be replaced with something
different at link time.  (Frontends that want to
allow values to be loaded out of weak constants can
give their constants weak_odr linkage).

llvm-svn: 67407
2009-03-20 21:53:29 +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
Chris Lattner 1d1087113c add testcase for type parsing.
llvm-svn: 61449
2008-12-27 08:10:46 +00:00
Nick Lewycky f5ffcbcd0b Extend the 'noalias' attribute to function return values. This is intended to
indicate functions that allocate, such as operator new, or list::insert. The
actual definition is slightly less strict (for now).

No changes to the bitcode reader/writer, asm printer or verifier were needed.

llvm-svn: 59934
2008-11-24 03:41:24 +00:00
Bill Wendling 33d58e7657 Put CPPBackend tests into their own directory and run them only if they're
supported.

llvm-svn: 53427
2008-07-10 22:35:32 +00:00
Matthijs Kooijman a2f743eaff Fix some escaping and quoting in RUN lines, mainly involving { and <. In two
cases quoting of <{ didn't work out, so I changed the grep to check for }>
instead.

This fixes 7 testcases that were not properly running before.

llvm-svn: 52182
2008-06-10 16:04:47 +00:00
Dan Gohman 5e7863de1b Remove lingering references to .llx and .tr in the tests.
llvm-svn: 51500
2008-05-23 21:15:35 +00:00
Gabor Greif d01c562e48 Eliminate questionable syntax for stdin redirection. This probably also speeds things up a bit.
llvm-svn: 51357
2008-05-20 22:07:21 +00:00
Gabor Greif 1e427c3264 sabre brings to my attention that the 'tr' suffix is also obsolete
llvm-svn: 51349
2008-05-20 21:00:03 +00:00
Gabor Greif f45ff35bfe Rename the last test with .llx extension to .ll, resolve duplicate test by renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too.
llvm-svn: 51328
2008-05-20 19:52:04 +00:00
Anton Korobeynikov f18ec8b160 Update test
llvm-svn: 50272
2008-04-25 17:54:21 +00:00
Nick Lewycky cd92245311 Start removing 'unwinds to' support from mainline in preparation for 2.3.
llvm-svn: 50086
2008-04-22 05:16:02 +00:00
Dan Gohman b37dab1360 Upgrade these tests for the current intrinsic prototypes.
llvm-svn: 49669
2008-04-14 18:19:18 +00:00
Anton Korobeynikov 72d5d42dbc Support chained aliases for LLVM IR printing. This fixes PR2145
llvm-svn: 48684
2008-03-22 08:17:17 +00:00
Chris Lattner ee8d960ed1 no need to keep around this output.
llvm-svn: 48285
2008-03-12 17:14:06 +00:00
Nick Lewycky fb2c1a999a Turn unwind_to into "unwinds to".
llvm-svn: 48123
2008-03-10 02:20:00 +00:00
Nick Lewycky b2e3c31587 Exercise the new CFG change.
llvm-svn: 47990
2008-03-06 06:55:58 +00:00
Nick Lewycky 8bbec39262 Oops, can't unwind to the entry block (entry block may have no preds).
llvm-svn: 47808
2008-03-02 03:34:55 +00:00
Nick Lewycky 3cc9be0b59 Add an unwind_to field to basic blocks, making them Users instead of Values.
This is the first checkin for PR1269, the new EH infrastructure.

llvm-svn: 47802
2008-03-02 02:48:09 +00:00
Tanya Lattner b7e02fc0bf Remove llvm-upgrade and update tests.
llvm-svn: 47784
2008-03-01 07:38:40 +00:00
Dan Gohman b582867567 Use not instead of ignore when an exit status is expected to always
be non-zero.

llvm-svn: 44866
2007-12-11 15:50:23 +00:00
Duncan Sands ad0ea2d430 Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls.  This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll).  Hopefully
a bitcode guru (who might that be? :) ) will fix it.

llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Nate Begeman d4d45c268c Add support for vectors to int <-> float casts.
llvm-svn: 44204
2007-11-17 03:58:34 +00:00
Chris Lattner 788f0d340a llvm/test programs should not be execution programs. This
will hopefully fix Gabor's Sparc problem.

llvm-svn: 43251
2007-10-23 17:56:04 +00:00
Dale Johannesen 6480cc6f8c Change all floating constants that are not exactly
representable to use hex format.

llvm-svn: 41722
2007-09-05 17:50:36 +00:00
Chandler Carruth 7132e00de7 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.

llvm-svn: 40807
2007-08-04 01:51:18 +00:00
Dale Johannesen ff4c3be741 Long double, part 1 of N. Support in IR.
llvm-svn: 40774
2007-08-03 01:03:46 +00:00
Dan Gohman 17f68f95d8 Delete the svn:executable property on these files, which aren't executable.
llvm-svn: 40441
2007-07-23 19:26:08 +00:00
Duncan Sands b063fa59d3 The Ada f-e produces various auxiliary output files
that cannot be suppressed and cannot be redirected:
they are dumped in the current working directory.
When running the testsuite this means that these
files do not end up in the Output directory.  The
best solution I could find is to change directory
into Output before running tests.

llvm-svn: 40437
2007-07-23 15:23:35 +00:00
Reid Spencer 314e1cb7ee For PR1553:
Change the keywords for the zext and sext parameter attributes to be 
zeroext and signext so they don't conflict with the keywords for the
instructions of the same name. This gets around the ambiguity.

llvm-svn: 40069
2007-07-19 23:13:04 +00:00
John Criswell 2660cef6d7 Convert .cvsignore files
llvm-svn: 37801
2007-06-29 16:35:07 +00:00
Zhou Sheng 2444a9adeb Commit first round work of PR1373. "noalias" is now fully supported in
VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll
updated also.

llvm-svn: 37432
2007-06-05 05:28:26 +00:00
Reid Spencer be9b3fce8a Make sure we can round-trip an escaped value in a name.
llvm-svn: 37259
2007-05-19 07:22:24 +00:00