Michael Gottesman
0f7053bd01
Remove SILBasicBlock::getBBArgIndex(SILArgument *) in favor of SILArgument::getIndex().
...
The index is a property of the argument. There is no reason from a modeling
perspective to go through the BB to get it.
Swift SVN r21338
2014-08-21 04:06:19 +00:00
Arnold Schwaighofer
2e83bdf01b
Add a convenience function on SILBasicBlock to move it after another Block
...
Swift SVN r19633
2014-07-07 21:05:22 +00:00
John McCall
cd6fc21900
Allow SILBasicBlocks to be constructed after a specific
...
block, and do so when splitting a block.
Swift SVN r19076
2014-06-22 05:01:06 +00:00
Nadav Rotem
1b650dcdf6
Add helper functions to SILBlock and SILFunction.
...
Swift SVN r18858
2014-06-13 06:10:07 +00:00
Mark Lacey
8156008cd8
Add a dead code elimination optimization pass.
...
In a loop like this:
var j = 2
for var i = 0; i < 100; ++i {
j += 3
}
it will completely eliminate j.
It does not yet support rewriting conditional branches as unconditional
branches in the cases where only empty blocks are control dependent on
an edge. Once this support is added, it will also completely eliminate
the loop itself.
Swift SVN r18615
2014-05-24 07:02:18 +00:00
Mark Lacey
924e30ea61
Rewrite BB args whose only use is in struct/tuple extract.
...
If we have BB args that are only used in a struct/tuple extract, and
that are generated in each predecessor with a struct/tuple instruction,
retype the BB arg and replace the argument with what would have been the
extracted value.
This provides more opportunties for jump threading to kick in.
Swift SVN r16509
2014-04-18 07:19:33 +00:00
Dmitri Hrybenko
be7759b149
Track uptstream LLVM API change: llvm::next() was removed, use std::next() instead
...
Swift SVN r14572
2014-03-02 13:32:30 +00:00
Adrian Prantl
c610ac94ef
Add an IsBare attribute to SILFunction for functions that do not have an
...
AST.
Swift SVN r11236
2013-12-13 04:48:37 +00:00
Adrian Prantl
2acb71831e
SILArgument: Make Decls mandatory for function arguments.
...
Swift SVN r11099
2013-12-10 23:30:23 +00:00
Stephen Lin
3f5c0dbf0e
Update SILArgument::getModule(), SILBasicBlock::getModule() and SILInstruction::getModule() signatures to match SILFunction::getModule(), for consistency; standardize usage of SILFunction::getParent() to SILFunction::getModule().
...
Swift SVN r8932
2013-10-04 21:12:20 +00:00
Adrian Prantl
8808d48578
Debug info: emit captured variables in closures. rdar://problem/15035486
...
Swift SVN r8859
2013-10-02 22:46:03 +00:00
Anna Zaks
4d7de376bb
[SIL] Refactor splitBasicBlock() into splitBasicBlock and splitBasicBlockAndBranch
...
This API is more explicit and avoids relying on passing around empty SILLocation.
(No functional change.)
Swift SVN r7988
2013-09-06 17:46:12 +00:00
Michael Gottesman
c86a54a438
Renamed SILBasicBlock::getInsts() => SILBasicBlock::getInstList() as discussed on the list.
...
Swift SVN r7776
2013-08-30 03:40:37 +00:00
Ted Kremenek
8f5b8ccb02
Rename "This" to "Self" and "this" to "self".
...
This was not likely an error-free change. Where you see problems
please correct them. This went through a fairly tedious audit
before committing, but comments might have been changed incorrectly,
not changed at all, etc.
Swift SVN r7631
2013-08-27 21:58:27 +00:00
Stephen Lin
4ae68cd72f
Completion of MandatoryInlining pass: recursive inlining, multiple basic blocks, and diagnosis of circular inlining.
...
Swift SVN r7242
2013-08-14 22:30:21 +00:00
Anna Zaks
e5c3a7ea80
[SIL] Make sure SILBasicBlock destructor gets called.
...
This also ensures that the instructions indie the basic block
get destructed.
Swift SVN r6667
2013-07-27 00:25:03 +00:00
Chris Lattner
c7373c563b
add regular convenience methods to SIL IR objects for getting parent containers.
...
Add a getOperand(n) method to SILInstruction.
Swift SVN r6425
2013-07-21 06:12:29 +00:00
Chris Lattner
0ad6fac283
Remove the basic block name field from SILBasicBlock. The name is currently
...
ignored and is going to be a private detail of the SILParser.
Swift SVN r5276
2013-05-22 22:24:39 +00:00
Chris Lattner
965242a833
rename SILBBArgument.h -> SILArgument.h to match the class name.
...
I'm done with renaming for now, boy do my fingers hurt.
Swift SVN r4595
2013-04-03 21:08:38 +00:00
Chris Lattner
a71bc3a78e
rename Value -> SILValue, BasicBlock -> SILBasicBlock, BBArgument -> SILArgument.
...
Swift SVN r4594
2013-04-03 21:05:42 +00:00
Chris Lattner
1beebda868
move Instruction/BasicBlock/BBArgument files to have SIL prefixes.
...
Swift SVN r4591
2013-04-03 18:43:54 +00:00