1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

179 Commits

Author SHA1 Message Date
Mikhail Glushenkov
0893cd31fa 80-column violation.
llvm-svn: 64586
2009-02-15 11:32:31 +00:00
Gabor Greif
f47945d757 incorporate review feedback
llvm-svn: 64158
2009-02-09 20:27:45 +00:00
Mikhail Glushenkov
bcf9e92ecf 80-column violations.
llvm-svn: 64147
2009-02-09 17:11:05 +00:00
Gabor Greif
5de6cc843a make sure that BranchInst::getSuccessor() does not assert in cast<>
even if the underlying operand is NULL. This may happen in debugging context
within opt with partial loop unrolling (see test/Transforms/LoopUnroll/partial.ll).
After this fix I can resubmit the (backed out) r63459:
* lib/VMCore/AsmWriter.cpp: use precise accessors.

llvm-svn: 64142
2009-02-09 15:45:06 +00:00
Gabor Greif
fbd40904c1 Simplify the logic of getting hold of a PHI predecessor block.
There is now a direct way from value-use-iterator to incoming block in PHINode's API.
This way we avoid the iterator->index->iterator trip, and especially the costly
getOperandNo() invocation. Additionally there is now an assertion that the iterator
really refers to one of the PHI's Uses.

llvm-svn: 62869
2009-01-23 19:40:15 +00:00
Chris Lattner
5902eb8ea6 add a helper method.
llvm-svn: 61978
2009-01-09 05:27:40 +00:00
Dan Gohman
8271066844 Tidy up #includes, deleting a bunch of unnecessary #includes.
llvm-svn: 61715
2009-01-05 17:59:02 +00:00
Chris Lattner
031a666948 move select validation logic into a shared place where the select ctor,
verifier, asm parser, etc can share it.

llvm-svn: 61461
2008-12-29 00:12:50 +00:00
Chris Lattner
c9d864b689 add a long-overdue AllocaInst::isStaticAlloca method.
llvm-svn: 60080
2008-11-26 02:54:17 +00:00
David Greene
b33593aa75 Don't force things to be Value * when they're not.
llvm-svn: 58354
2008-10-29 00:30:54 +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
4735934d73 Make some minor reorganizations and comment changes to eliminate trivial
differences between the CallInst and InvokeInst classes.

llvm-svn: 56699
2008-09-26 21:38:45 +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
Devang Patel
a3e9bf1bca s/ParameterAttributes/Attributes/g
llvm-svn: 56513
2008-09-23 23:03:40 +00:00
Dan Gohman
d987c8990c FCmpInst predicates UNO, ORD, FALSE, and TRUE are commutative.
llvm-svn: 56243
2008-09-16 16:44:00 +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
Matthijs Kooijman
6ef5a25c7f Add a GetElementPtrInst::getIndexedType that accepts uint64_t's instead of just Value*'s.
llvm-svn: 54157
2008-07-29 08:46:11 +00:00
Evan Cheng
e91c8c4508 Rename instance variables, parameter argument names to eliminate a bunch of compilation warnings with -Wshadow.
llvm-svn: 53970
2008-07-24 00:08:56 +00:00
Dan Gohman
6564581be0 Enable first-class aggregates support.
Remove the GetResultInst instruction. It is still accepted in LLVM assembly
and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove
support for return instructions with multiple values. These are auto-upgraded
to use InsertValueInst instructions.

The IRBuilder still accepts multiple-value returns, and auto-upgrades them
to InsertValueInst instructions.

llvm-svn: 53941
2008-07-23 00:34:11 +00:00
Bill Wendling
01f491daa7 Removing tabs.
llvm-svn: 53902
2008-07-22 07:14:12 +00:00
Duncan Sands
b854603cb5 Add some convenience methods for manipulating
call attributes.

llvm-svn: 53223
2008-07-08 08:38:44 +00:00
Dan Gohman
b52f318a0c Remove two convenience constructors because they're now private, and the
private implementation doesn't really need the convenience.

llvm-svn: 52629
2008-06-23 16:48:17 +00:00
Dan Gohman
696e841b14 Remove an unnecessary cast.
llvm-svn: 52626
2008-06-23 16:38:10 +00:00
Owen Anderson
5eeafbc3f7 Add an idx_iterator to the insertvalue and extractvalue instructions.
llvm-svn: 52493
2008-06-19 17:15:57 +00:00
Gabor Greif
7c2e365dbc get rid of ExtractValueInst::init's Value argument, it is already passed to the UnaryInstruction ctor
llvm-svn: 52064
2008-06-06 21:06:32 +00:00
Gabor Greif
8ac103e71d make ExtractValueInst derived from UnaryInstruction
llvm-svn: 52061
2008-06-06 20:28:12 +00:00
Bill Wendling
cb6cdd495d Cast because I think I know what I'm doing. There are warnings about converting
from 64-bit to 32-bit.

llvm-svn: 51982
2008-06-05 07:35:27 +00:00
Matthijs Kooijman
e60059744e Fix 80 column violations.
llvm-svn: 51981
2008-06-05 07:26:15 +00:00
Matthijs Kooijman
318e1df0e4 Add a Name parameter to two of the init methods of GetElementPointer to make the name setting more consistent.
llvm-svn: 51945
2008-06-04 16:14:12 +00:00
Matthijs Kooijman
2f6b694afc Implement the two constructors in InsertValueInst and ExtractValueInst.
Add a Name argment to two init methods in these classes as well to make things
a bit more consistent.

llvm-svn: 51937
2008-06-04 14:40:55 +00:00
Dan Gohman
9ca8f65a00 Fix a copy+paste error in a comment.
llvm-svn: 51821
2008-05-31 19:09:47 +00:00
Dan Gohman
caa9c6e94d Fix some bugs with the handling of indices in insertvalue/extractvalue.
llvm-svn: 51820
2008-05-31 19:09:08 +00:00
Dan Gohman
1ab21af8e0 Factor several methods, including getInversePredicate and
getSwappedPredicate, from ICmpInst and FCmpInst into common
methods in CmpInst. This allows CmpInsts to be manipulated
generically.

llvm-svn: 51810
2008-05-31 02:47:54 +00:00
Dan Gohman
ac5c3382fe IR, bitcode reader, bitcode writer, and asmparser changes to
insertvalue and extractvalue to use constant indices instead of
Value* indices. And begin updating LangRef.html.

There's definately more to come here, but I'm checking this 
basic support in now to make it available to people who are
interested.

llvm-svn: 51806
2008-05-31 00:58:22 +00:00
Gabor Greif
e052a42a62 eliminate calls to deprecated Use::init() interface
llvm-svn: 51570
2008-05-26 21:33:52 +00:00
Dan Gohman
9674662036 Add more IR support for the new extractvalue and insertvalue
instructions.

llvm-svn: 51461
2008-05-23 00:36:11 +00:00
Nick Lewycky
6f3744c685 Move isTrueWhenEqual to ICmpInst.
llvm-svn: 51215
2008-05-17 07:33:39 +00:00
Eric Christopher
11359e9b1c Add functions to enable adding a single attribute to a function and
its associated call site.

llvm-svn: 51204
2008-05-16 20:39:43 +00:00
Dan Gohman
1760a08221 Update comments based on Duncan's feedback.
llvm-svn: 51170
2008-05-15 23:35:32 +00:00
Dan Gohman
821bf58428 IR support for extractvalue and insertvalue instructions. Also, begin
moving toward making structs and arrays first-class types.

llvm-svn: 51157
2008-05-15 19:50:34 +00:00
Nate Begeman
d805c4fac4 Don't generate unused variables in a no-assert build
Add some checks to the new vicmp,vfcmp instructions

llvm-svn: 51125
2008-05-14 20:28:31 +00:00
Gabor Greif
dd2f5c797d Merge of r51073-51074 from use-diet branch.
Do not rely on std::swap<Use>, provide a (faster) member function instead.
This change is primarily necessitated by MSVC++'s incompatibility with
declaring std::swap<Use> to be a friend of Use.

Also contains some minor tweaks to Use inline functions,
to undo pointless changes that sneaked in with the last merge.

llvm-svn: 51078
2008-05-13 22:51:52 +00:00
Gabor Greif
22afb1f8f0 Derive GetResultInst from UnaryInstruction, this simplifies code and removes a FIXME.
llvm-svn: 51023
2008-05-13 07:09:08 +00:00
Nate Begeman
b5b1e1353b Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRef
for details.  CodeGen support coming in a follow up patch

llvm-svn: 50985
2008-05-12 19:01:56 +00:00
Bill Wendling
cc084a6ba1 Remove warnings when using -Wshorten-64-to-32.
llvm-svn: 50952
2008-05-10 19:59:59 +00:00
Bill Wendling
cc8838799d Prevent -W64-to-32-shortened warnings.
llvm-svn: 50947
2008-05-10 11:26:52 +00:00
Bill Wendling
adfb940f3a Prevent warnings from the -Wshorten-64-to-32 flag.
llvm-svn: 50946
2008-05-10 10:58:07 +00:00
Gabor Greif
49bf1a4cf6 merge of use-diet branch to trunk
llvm-svn: 50943
2008-05-10 08:32:32 +00:00
Evan Cheng
d9353009b7 Fix more -Wshorten-64-to-32 warnings.
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Evan Cheng
281654e4fb Fix 80 column violations.
llvm-svn: 50655
2008-05-05 17:41:03 +00:00