Commit Graph

713 Commits

Author SHA1 Message Date
Nick Lewycky
d802be39d7 Update the .cvs files for nocapture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61241 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 09:41:54 +00:00
Nick Lewycky
73ddd4f00d Commit missed files from nocapture change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61240 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 09:38:31 +00:00
Bill Wendling
29bc4f0dcc Forgot to revert r61031 when I reverted r61019, r61030, and r61040.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61150 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-17 20:59:57 +00:00
Bill Wendling
6fa311c233 Temporarily revert r61019, r61030, and r61040. These were breaking LLVM Release
builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61094 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-16 19:06:48 +00:00
Nick Lewycky
fd7eb7252f Update generated files after nocapture syntax change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61031 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-15 07:31:07 +00:00
Nick Lewycky
382da62ec2 It turns out that "align 1" and unaligned are different. Add a bias to the
alignment attribute such that 0 means unaligned.

This will probably require a rebuild of llvm-gcc because of the change to
Attributes.h. If you see many test failures on "make check", please rebuild
your llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61030 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-15 07:29:55 +00:00
Nick Lewycky
e642658480 Introducing nocapture, a parameter attribute for pointers to indicate that the
callee will not introduce any new aliases of that pointer.

The attributes had all bits allocated already, so I decided to collapse
alignment. Alignment was previously stored as a 16-bit integer from bits 16 to
32 of the attribute, but it was required to be a power of 2. Now it's stored in
log2 encoded form in five bits from 16 to 21. That gives us 11 more bits of
space.

You may have already noticed that you only need four bits to encode a 16-bit
power of two, so why five bits? Because the AsmParser accepted 32-bit
alignments, even though we couldn't store them (they were silently discarded).
Now we can store them in memory, but not in the bitcode.

The bitcode format was already storing these as 64-bit VBR integers. So, the
bitcode format stays the same, keeping the alignment values stored as 16 bit
raw values. There's some hideous code in the reader and writer that deals with
this, waiting to be ripped out the moment we run out of bits again and have to
replace the parameter attributes table encoding.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61019 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-15 01:34:58 +00:00
Nick Lewycky
02ff308aa1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59934 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 03:41:24 +00:00
Bill Wendling
6ff4bfee3a Regenerated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59204 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13 01:03:00 +00:00
Bill Wendling
e9e6bdf27f Implement stack protectors as function attributes: "ssp" and "sspreq".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59202 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13 01:02:14 +00:00
Nuno Lopes
aa386d0881 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58697 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 14:43:20 +00:00
Nuno Lopes
b0c53da1e1 fix leakage of APFloats in getExistingVal()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58696 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 14:42:19 +00:00
Nuno Lopes
1983033820 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58694 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 14:28:33 +00:00
Nuno Lopes
91c2620862 fix leakage of APSInt in getVal()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58693 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 14:26:58 +00:00
Oscar Fuentes
ddbbb4fe89 CMake: Cross-platform support for using pre-generated llvmAsmParser.cpp and llvmAsmParser.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58130 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 03:19:08 +00:00
Cedric Venet
389b715e0f Modify the cmake build system so that if it doesn't find bison, it will use the pregenerated file in from the svn (.cvs). Work only for windows for the moment. Tested on Vista64 with MSVC2008express.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58090 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 11:24:33 +00:00
Nuno Lopes
8a5f34776e regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57577 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 12:05:02 +00:00
Nuno Lopes
f2bd650fdf fix memleak in GetForwardRefForGlobal()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57576 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 12:04:36 +00:00
Nuno Lopes
f05ff66a22 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57575 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 11:20:21 +00:00
Nuno Lopes
ee87b3b6d9 fix memleak in getTypeVal()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57574 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 11:19:34 +00:00
Nuno Lopes
6ec8a25b27 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57573 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 11:11:12 +00:00
Nuno Lopes
0ecaf52796 fix memleak in ResolveTypeTo()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57572 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 11:10:21 +00:00
Chris Lattner
740e709d0d regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57561 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 06:16:57 +00:00
Chris Lattner
c7e3069bfa Fix the .ll grammar rules to allow any type before an 'i32', not just an
integer type.  Invalid things like 'float 42' are now rejected by the
semantic analysis in the productions not the parser.  This fixes PR2733.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 06:16:45 +00:00
Chris Lattner
f9078f99d9 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57559 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 06:03:48 +00:00
Chris Lattner
22b92e3b86 Eliminate the "IntType ::= INTTYPE" production, just use
INTTYPE everywhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57558 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 06:03:37 +00:00
Dale Johannesen
236bbd4146 Generated files for previous checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57331 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-09 23:01:34 +00:00
Dale Johannesen
23a98551ab Add a "loses information" return value to APFloat::convert
and APFloat::convertToInteger.  Restore return value to
IEEE754.  Adjust all users accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57329 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-09 23:00:39 +00:00
Chris Lattner
9fc4da40ef regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57290 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-08 06:44:45 +00:00
Chris Lattner
cd16843499 Add missing semicolumns in parser rules, those missing semicolumns
are required to compile with the latest Bison.

Patch by Samuel Tardieu!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57289 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-08 06:44:36 +00:00
Nuno Lopes
8a88a37b16 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57114 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 16:49:34 +00:00
Nuno Lopes
d0ad67788d clean ArgTypeListI production: free the PATypeHolder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57113 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 16:49:03 +00:00
Nuno Lopes
191dfb96de regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57009 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 15:52:39 +00:00
Nuno Lopes
aa1aee3e95 fix more memleaks in ResolveTypeTo() and ParseGlobalVariable()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57008 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 15:51:46 +00:00
Nuno Lopes
9e9631dae9 regenerate with bison 2.3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57007 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 15:45:58 +00:00
Nuno Lopes
06a62886fb fix memleak in FunctionHeaderH
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57005 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 15:44:21 +00:00
Devang Patel
652203f3f3 Support inreg, zext and sext as return value attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56801 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 20:49:50 +00:00
Devang Patel
2c9c3e7368 Implement function notes as function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56716 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 23:51:19 +00:00
Dale Johannesen
e7261863c5 Generated files for warning fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56715 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 23:46:20 +00:00
Dale Johannesen
4598a4ece8 Fix a compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56714 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 23:45:53 +00:00
Devang Patel
19c874638d Now Attributes are divided in three groups
- return attributes - inreg, zext and sext
- parameter attributes
- function attributes - nounwind, readonly, readnone, noreturn

Return attributes use 0 as the index.
Function attributes use ~0U as the index.

This patch requires corresponding changes in llvm-gcc and clang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56704 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 22:53:05 +00:00
Dale Johannesen
dfe8c84e1e Generated files for previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56679 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 19:32:34 +00:00
Dale Johannesen
86098bd6a6 Add "inreg" field to CallSDNode (doesn't increase
its size).  Adjust various lowering functions to
pass this info through from CallInst.  Use it to
implement sseregparm returns on X86.  Remove
X86_ssecall calling convention.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56677 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 19:31:26 +00:00
Devang Patel
0598866c05 Large mechanical patch.
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g

This sets the stage 
- to implement function notes as function attributes and 
- to distinguish between function attributes and return value attributes.

This requires corresponding changes in llvm-gcc and clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 21:00:45 +00:00
Eric Christopher
2a5196fe67 Fix fallout from revision r56535.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56545 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 04:55:49 +00:00
Devang Patel
20bcaff6a7 Put FN_NOTE_AlwaysInline and others in FnAttr namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56527 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 00:06:15 +00:00
Devang Patel
dd4924c564 Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.
Do not check isDeclaration() in hasNote(). It is clients' responsibility.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56524 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-23 23:52:03 +00:00
Devang Patel
2d2255d2d9 s/ParameterAttributes/Attributes/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56520 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-23 23:25:44 +00:00
Devang Patel
eaf42abab6 s/ParameterAttributes/Attributes/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56513 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-23 23:03:40 +00:00
Devang Patel
d9b4a5f859 Use parameter attribute store (soon to be renamed) for
Function Notes also. Function notes are stored at index ~0.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56511 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-23 22:35:17 +00:00