Devang Patel
d90556aed0
Attributes noinline alwaysinline are incompatible
...
llvm-svn: 56939
2008-10-01 23:41:25 +00:00
Chris Lattner
91e5279de1
add a new form of Type::dump that takes a module for type names,
...
patch provided by Tomas Lindquist Olsen!
llvm-svn: 56929
2008-10-01 20:16:19 +00:00
Dan Gohman
e1d0930044
Make some implicit conversions explicit, to avoid compiler warnings.
...
llvm-svn: 56927
2008-10-01 19:58:59 +00:00
Duncan Sands
88d8323743
Factorize code: remove variants of "strip off
...
pointer bitcasts and GEP's", and centralize the
logic in Value::getUnderlyingObject. The
difference with stripPointerCasts is that
stripPointerCasts only strips GEPs if all
indices are zero, while getUnderlyingObject
strips GEPs no matter what the indices are.
llvm-svn: 56922
2008-10-01 15:25:41 +00:00
Dan Gohman
8ba73d6d60
Don't prepend a space character for constants in Value::print.
...
llvm-svn: 56920
2008-10-01 15:09:37 +00:00
Devang Patel
7536edca09
Support inreg, zext and sext as return value attributes.
...
llvm-svn: 56801
2008-09-29 20:49:50 +00:00
Devang Patel
47a504c87c
Implement function notes as function attributes.
...
llvm-svn: 56716
2008-09-26 23:51:19 +00:00
Devang Patel
e4e6ea0728
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.
llvm-svn: 56704
2008-09-26 22:53:05 +00:00
Dan Gohman
a9e963a0b4
Fix missing whitespace in the printing of function notes.
...
llvm-svn: 56702
2008-09-26 22:02:59 +00:00
Dale Johannesen
423053d8a7
Another file I forgot.
...
llvm-svn: 56678
2008-09-26 19:31:53 +00:00
Dale Johannesen
3f62c40108
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.
llvm-svn: 56677
2008-09-26 19:31:26 +00:00
Bill Wendling
8b4fecfb09
Make pointer parameter const for isUsedInBasicBlock.
...
llvm-svn: 56625
2008-09-25 22:42:01 +00:00
Devang Patel
64dd7a2e89
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.
llvm-svn: 56622
2008-09-25 21:00:45 +00:00
Dan Gohman
f03be3916e
Avoid a spurious extra space character when printing empty structs.
...
llvm-svn: 56616
2008-09-25 17:37:20 +00:00
Oscar Fuentes
4e4ae7ef78
CMake: Lists of source files updated. Removed bogus dependency from
...
lib/VMCore/CMakeLists.txt
llvm-svn: 56541
2008-09-24 01:58:12 +00:00
Devang Patel
f0bda74eca
s/ParamAttrsWithIndex/FnAttributeWithIndex/g
...
llvm-svn: 56535
2008-09-24 00:55:02 +00:00
Devang Patel
64a2547c42
s/ParamAttributeListImpl/AttributeListImpl/g
...
llvm-svn: 56532
2008-09-24 00:29:49 +00:00
Devang Patel
25ecdc49d9
Put FN_NOTE_AlwaysInline and others in FnAttr namespace.
...
llvm-svn: 56527
2008-09-24 00:06:15 +00:00
Devang Patel
b39defd763
Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.
...
Do not check isDeclaration() in hasNote(). It is clients' responsibility.
llvm-svn: 56524
2008-09-23 23:52:03 +00:00
Devang Patel
1b09ba231f
80 cols
...
llvm-svn: 56521
2008-09-23 23:32:15 +00:00
Devang Patel
a3e9bf1bca
s/ParameterAttributes/Attributes/g
...
llvm-svn: 56513
2008-09-23 23:03:40 +00:00
Devang Patel
ad8ca34acd
Use parameter attribute store (soon to be renamed) for
...
Function Notes also. Function notes are stored at index ~0.
llvm-svn: 56511
2008-09-23 22:35:17 +00:00
Duncan Sands
2c9f6ab06d
Rationalize the names of passes that print information:
...
-callgraph => print-callgraph
-callscc => print-callgraph-sccs
-cfgscc => print-cfg-sccs
-externalfnconstants => print-externalfnconstants
-print => print-function
-print-alias-sets (no change)
-print-callgraph => dot-callgraph
-print-cfg => dot-cfg
-print-cfg-only => dot-cfg-only
-print-dom-info (no change)
-printm => print-module
-printusedtypes => print-used-types
llvm-svn: 56487
2008-09-23 12:47:39 +00:00
Devang Patel
c7fc5ed65f
Add hasNote() to check note associated with a function.
...
llvm-svn: 56477
2008-09-22 22:32:29 +00:00
Oscar Fuentes
0f25988689
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Gabor Greif
984ba5a313
backing out my last commit, it was not intended to go on the trunk
...
llvm-svn: 56349
2008-09-19 15:13:20 +00:00
Gabor Greif
67fa076542
first shot at removing Use::Val
...
untested, Use::swap() is definitely not done yet
llvm-svn: 56348
2008-09-19 15:03:57 +00:00
Dan Gohman
6418cb3998
Fix WriteAsOperand to not emit a leading space character. Adjust
...
its callers to emit a space character before calling it when a
space is needed.
This fixes several spurious whitespace issues in
ScalarEvolution's debug dumps. See the test changes for
examples.
This also fixes odd space-after-tab indentation in the output
for switch statements, and changes calls from being printed like
this:
call void @foo( i32 %x )
to this:
call void @foo(i32 %x)
llvm-svn: 56196
2008-09-14 17:21:12 +00:00
Devang Patel
b08f098957
Add assertion check.
...
llvm-svn: 56016
2008-09-09 21:38:40 +00:00
Anton Korobeynikov
6ad8b060d0
Make safer variant of alias resolution routine to be default
...
llvm-svn: 56005
2008-09-09 20:05:04 +00:00
Anton Korobeynikov
bcf0165453
Fix typo
...
llvm-svn: 55998
2008-09-09 18:24:07 +00:00
Anton Korobeynikov
3a24741034
Fix incorrect linker behaviour: we shouldn't resolve weak aliases.
...
llvm-svn: 55997
2008-09-09 18:23:48 +00:00
Devang Patel
ccd2dfd23a
Simplify.
...
Fix outdated comment.
llvm-svn: 55993
2008-09-09 17:56:50 +00:00
Dan Gohman
3e79d697f3
Extend the vcmp/fcmp LLVM IR instructions to take vectors as arguments
...
and, if so, to return a vector of boolean as a result;
Extend the select LLVM IR instruction to allow you to specify a result
type which is a vector of boolean, in which case the result will be an
element-wise selection instead of choosing one vector or the other; and
Update LangRef.html to describe these changes.
This patch was contributed by Preston Gurd!
llvm-svn: 55969
2008-09-09 01:02:47 +00:00
Dan Gohman
3d1ee171e8
Bitcasting two or from aggregate types is not permitted. Update
...
LangRef.html, and teach the verifier to check bitcast instructions.
llvm-svn: 55921
2008-09-08 16:45:59 +00:00
Dan Gohman
e1f9be27bc
Tidy up several unbeseeming casts from pointer to intptr_t.
...
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Devang Patel
c0d6a60b65
Avoid extra comma.
...
llvm-svn: 55742
2008-09-03 22:55:40 +00:00
Devang Patel
f8c7bd2a05
Parse and print opt_size note.
...
llvm-svn: 55740
2008-09-03 22:10:21 +00:00
Nick Lewycky
8b8886c6b0
Try to fold each element of a vector. This is needed to maintain structural
...
equivalence.
llvm-svn: 55694
2008-09-03 06:48:55 +00:00
Nick Lewycky
57cebeaeba
Don't crash when trying to constant fold a vector with some elements that can't
...
be folded. Instead, fail to fold the entire vector.
We could also return a vector with some elements folded and some not. If anyone
thinks that's a better approach, please speak up!
llvm-svn: 55689
2008-09-03 05:54:33 +00:00
Devang Patel
5659d2508e
s/FP_AlwaysInline/FN_NOTE_AlwaysInline/g
...
llvm-svn: 55676
2008-09-02 22:43:57 +00:00
Devang Patel
d131eb6bfb
Use bitwise AND.
...
llvm-svn: 55656
2008-09-02 21:46:44 +00:00
Devang Patel
4b52a398c3
Print function notes.
...
llvm-svn: 55647
2008-09-02 20:56:33 +00:00
Devang Patel
863655cd40
Initialize function notes.
...
llvm-svn: 55645
2008-09-02 20:51:15 +00:00
Nuno Lopes
5c40eb8e05
plug a little memleak in verifyFunction()
...
# first commit to llvm, so whatch out :)
llvm-svn: 55631
2008-09-02 11:30:10 +00:00
Gordon Henriksen
3324b5c3ca
PR2731: C and Ocaml bindings for setTailCall and isTailCall.
...
Based on patch by Giorgos Korfiatis.
llvm-svn: 55570
2008-08-30 16:34:54 +00:00
Gordon Henriksen
3a9a0e274b
Fix ConstantExpr::getInsertElement.
...
Breakage was exposed in the Ocaml bindings tests after Chris
uncommented an assertion in r55084.
llvm-svn: 55566
2008-08-30 15:41:51 +00:00
Chris Lattner
efbbbb0cde
Asmprint nameless instructions as:
...
%4 = add ...
instead of:
add ... ; 4
This makes opt -print-cfg output actually usable and makes .ll files
generally easier to read. This fixes PR2480
llvm-svn: 55541
2008-08-29 17:19:30 +00:00
Chris Lattner
bd43eec286
Make the verifier reject instructions which have null pointers
...
for operands: rdar://6179606. no testcase, because I can't write
a .ll file that is this broken ;-)
llvm-svn: 55460
2008-08-28 04:02:44 +00:00
Bill Wendling
84547c2a09
Put file scoped constants in an anonymous namespace. Use the "using namespace
...
llvm" for consistency.
llvm-svn: 55435
2008-08-27 21:10:13 +00:00