#
513aaa56 |
| 01-Feb-2012 |
Stepan Dyatkovskiy <stpworld@narod.ru> |
SwitchInst refactoring. The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods t
SwitchInst refactoring. The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want.
What was done:
1. Changed semantics of index inside the getCaseValue method: getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous. 2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned. 3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment. 4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst. 4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor. 4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor.
Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang. llvm-svn: 149481
show more ...
|
#
17c981a4 |
| 01-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert Chris' commits up to r149348 that started causing VMCoreTests unit test to fail.
These are:
r149348 r149351 r149352 r149354 r149356 r149357 r149361 r149362 r149364 r149365
llvm-svn: 149470
|
#
8ea967d0 |
| 31-Jan-2012 |
Chris Lattner <sabre@nondot.org> |
with recent changes, ConstantArray is never a "string". Remove the associated methods and constant fold the clients to false.
llvm-svn: 149362
|
#
5d917075 |
| 30-Jan-2012 |
Chris Lattner <sabre@nondot.org> |
fix a major oversight that is breaking some llvm-test tests.
llvm-svn: 149230
|
#
372dd1ea |
| 30-Jan-2012 |
Chris Lattner <sabre@nondot.org> |
Add bitcode reader and writer support for ConstantDataAggregate, which should be feature complete now. Lets see if it works.
llvm-svn: 149215
|
#
a5054ad2 |
| 20-Jan-2012 |
Kostya Serebryany <kcc@google.com> |
Extend Attributes to 64 bits
Problem: LLVM needs more function attributes than currently available (32 bits). One such proposed attribute is "address_safety", which shows that a function is being ch
Extend Attributes to 64 bits
Problem: LLVM needs more function attributes than currently available (32 bits). One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc).
Solution: - extend the Attributes from 32 bits to 64-bits - wrap the object into a class so that unsigned is never erroneously used instead - change "unsigned" to "Attributes" throughout the code, including one place in clang. - the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking. - the class has "safe operator bool()" to support the common idiom: if (Attributes attr = getAttrs()) useAttrs(attr); - The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls - Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work. - Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit.
Tested: "make check" on Linux (32-bit and 64-bit) and Mac (10.6) built/run spec CPU 2006 on Linux with clang -O2.
This change will break clang build in lib/CodeGen/CGCall.cpp. The following patch will fix it.
llvm-svn: 148553
show more ...
|
#
f3e8502c |
| 10-Jan-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Add 'llvm_unreachable' to passify GCC's understanding of the constraints of several newly un-defaulted switches. This also helps optimizers (including LLVM's) recognize that every case is covered, an
Add 'llvm_unreachable' to passify GCC's understanding of the constraints of several newly un-defaulted switches. This also helps optimizers (including LLVM's) recognize that every case is covered, and we should assume as much.
llvm-svn: 147861
show more ...
|
#
edbb58c5 |
| 10-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Remove unnecessary default cases in switches that cover all enum values.
llvm-svn: 147855
|
#
518cda42 |
| 17-Dec-2011 |
Dan Gohman <gohman@apple.com> |
The powers that be have decided that LLVM IR should now support 16-bit "half precision" floating-point with a first-class type.
This patch adds basic IR support (but not codegen support).
llvm-svn:
The powers that be have decided that LLVM IR should now support 16-bit "half precision" floating-point with a first-class type.
This patch adds basic IR support (but not codegen support).
llvm-svn: 146786
show more ...
|
#
9646c0d0 |
| 08-Dec-2011 |
Chad Rosier <mcrosier@apple.com> |
Fix 80-column. Simplify code.
llvm-svn: 146112
|
#
a966c319 |
| 08-Dec-2011 |
Chad Rosier <mcrosier@apple.com> |
Fix comments.
llvm-svn: 146109
|
#
42ee1522 |
| 07-Dec-2011 |
Chad Rosier <mcrosier@apple.com> |
Fix comments.
llvm-svn: 146107
|
#
16be674e |
| 07-Dec-2011 |
Chad Rosier <mcrosier@apple.com> |
Flesh out a bit more of the bitcode use-list ordering preservation code. Nothing too interesting at this point, but comments are welcome. Part of rdar://9860654 and PR5680.
llvm-svn: 146090
|
#
ca2567b8 |
| 07-Dec-2011 |
Chad Rosier <mcrosier@apple.com> |
Begin adding experimental support for preserving use-list ordering of bitcode files. First, add a new block USELIST_BLOCK to the bitcode format. This is where USELIST_CODE_ENTRYs will be stored.
Begin adding experimental support for preserving use-list ordering of bitcode files. First, add a new block USELIST_BLOCK to the bitcode format. This is where USELIST_CODE_ENTRYs will be stored. The format of the USELIST_CODE_ENTRYs have not yet been defined. Add support in the BitcodeReader for parsing the USELIST_BLOCK. Part of rdar://9860654 and PR5680.
llvm-svn: 146078
show more ...
|
Revision tags: llvmorg-3.0.0, llvmorg-3.0.0-rc4, llvmorg-3.0.0-rc3 |
|
#
9589872a |
| 03-Nov-2011 |
Chad Rosier <mcrosier@apple.com> |
Remove some cruft from the BitcodeWriter, while still maintaining backward compatibility in the BitcodeReader.
llvm-svn: 143598
|
Revision tags: llvmorg-3.0.0-rc2, llvmorg-3.0.0-rc1 |
|
#
fae14758 |
| 12-Aug-2011 |
Bill Wendling <isanbard@gmail.com> |
Initial commit of the 'landingpad' instruction.
This implements the 'landingpad' instruction. It's used to indicate that a basic block is a landing pad. There are several restrictions on its use (se
Initial commit of the 'landingpad' instruction.
This implements the 'landingpad' instruction. It's used to indicate that a basic block is a landing pad. There are several restrictions on its use (see LangRef.html for more detail). These restrictions allow the exception handling code to gather the information it needs in a much more sane way.
This patch has the definition, implementation, C interface, parsing, and bitcode support in it.
llvm-svn: 137501
show more ...
|
#
335d399a |
| 12-Aug-2011 |
Chris Lattner <sabre@nondot.org> |
switch to use the new api for structtypes.
llvm-svn: 137480
|
#
75ec09c0 |
| 12-Aug-2011 |
Chad Rosier <mcrosier@apple.com> |
Whitespace and formatting. No functional change intended.
llvm-svn: 137463
|
#
59b66883 |
| 09-Aug-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Representation of 'atomic load' and 'atomic store' in IR.
llvm-svn: 137170
|
#
f891bf8b |
| 31-Jul-2011 |
Bill Wendling <isanbard@gmail.com> |
Add the 'resume' instruction for the new EH rewrite.
This adds the 'resume' instruction class, IR parsing, and bitcode reading and writing. The 'resume' instruction resumes propagation of an existin
Add the 'resume' instruction for the new EH rewrite.
This adds the 'resume' instruction class, IR parsing, and bitcode reading and writing. The 'resume' instruction resumes propagation of an existing (in-flight) exception whose unwinding was interrupted with a 'landingpad' instruction (to be added later).
llvm-svn: 136589
show more ...
|
#
ad088e67 |
| 30-Jul-2011 |
Bill Wendling <isanbard@gmail.com> |
Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338, r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444, r136445, r136446, r136253 pending revie
Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338, r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444, r136445, r136446, r136253 pending review.
llvm-svn: 136556
show more ...
|
#
c9a551eb |
| 28-Jul-2011 |
Eli Friedman <eli.friedman@gmail.com> |
LangRef and basic memory-representation/reading/writing for 'cmpxchg' and 'atomicrmw' instructions, which allow representing all the current atomic rmw intrinsics.
The allowed operands for these ins
LangRef and basic memory-representation/reading/writing for 'cmpxchg' and 'atomicrmw' instructions, which allow representing all the current atomic rmw intrinsics.
The allowed operands for these instructions are heavily restricted at the moment; we can probably loosen it a bit, but supporting general first-class types (where it makes sense) might get a bit complicated, given how SelectionDAG works.
As an initial cut, these operations do not support specifying an alignment, but it would be possible to add if we think it's useful. Specifying an alignment lower than the natural alignment would be essentially impossible to support on anything other than x86, but specifying a greater alignment would be possible. I can't think of any useful optimizations which would use that information, but maybe someone else has ideas.
Optimizer/codegen support coming soon.
llvm-svn: 136404
show more ...
|
#
6c923bb8 |
| 27-Jul-2011 |
Bill Wendling <isanbard@gmail.com> |
Merge the contents from exception-handling-rewrite to the mainline.
This adds the new instructions 'landingpad' and 'resume'.
llvm-svn: 136253
|
#
fee02c6c |
| 25-Jul-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Initial implementation of 'fence' instruction, the new C++0x-style replacement for llvm.memory.barrier.
This is just a LangRef entry and reading/writing/memory representation; optimizer+codegen supp
Initial implementation of 'fence' instruction, the new C++0x-style replacement for llvm.memory.barrier.
This is just a LangRef entry and reading/writing/memory representation; optimizer+codegen support coming soon.
llvm-svn: 136009
show more ...
|
#
229907cd |
| 18-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
land David Blaikie's patch to de-constify Type, with a few tweaks.
llvm-svn: 135375
|