Commit Graph

160 Commits

Author SHA1 Message Date
Chris Lattner
38f19fed50 de-indent classes in this file and fit 80 columns. No functionality change.
Swift SVN r5264
2013-05-22 17:23:40 +00:00
Chris Lattner
1f971f88dd Remove the IsLoadable flag from SILType, and the isInvalid() state for SILType.
This frees up an extra bit in SILType, which we can expose to LLVM through
PointerLikeTypeTraits.  Use this bit in a PointerUnion, which allows simplifying
ValueBase, which happened to be the last use of the isInvalid() state.



Swift SVN r5218
2013-05-18 00:21:46 +00:00
Joe Groff
bcb49ce450 SIL: Key functions directly without SILConstant.
Replace 'constant_ref' with 'function_ref', which references a SILFunction directly, and 'global_addr', which references a global variable VarDecl. Get rid of the SILConstant-to-SILFunction mapping in SILModule and replace it with an ilist of SILFunctions. Allow SILFunctions to be 'external' by not having any blocks in their body. 

For now, SILFunctions still carry around their SILConstant "name", because name mangling and IRGen still rely on access to the original decl in order to recover IRGen information, which unfortunately leaves IRGen's CodeRefs in a gross, awkward intermediate state. Lifting mangling, AbstractCC, and other linkage attributes to SIL should clear up this up.

Swift SVN r4865
2013-04-23 23:29:04 +00:00
Joe Groff
a90338bddb IRGen: Compile builtin calls from SIL.
When lowering SIL builtin ConstantRefs, just stash away the FuncDecl, and pass that decl on to a tweaked version of emitBuiltinCall when the constant is applied.

Swift SVN r4736
2013-04-15 21:04:36 +00:00
Joe Groff
bc2abab6d1 SIL: Add SILValue::dumpInContext.
Dumps an instruction with its operands and users. Useful for debugging.

Swift SVN r4713
2013-04-12 16:36:25 +00:00
John McCall
8dca52a2b0 Enhance the verifier to verify some basic properties of uses.
Also, refactor it to make it completely painless to introduce
new checks at arbitrary levels in the hierarchy.

Swift SVN r4710
2013-04-12 05:39:02 +00:00
John McCall
7e15f0a557 Make SIL-visiting not have a default implementation, make classof
take a const ValueBase* instead of a SILValue, implement SILArgument
cases for a few visitors and opt others out explicitly, and assert
that classes in the SIL value hierarchy override their superclass's
classof.

Swift SVN r4705
2013-04-12 01:39:52 +00:00
John McCall
f9226a8178 Add a getAllOperands() method to SILInstructions.
Required some renaming of the internal field-selector constants
to avoid inadvertent shadowing.

Swift SVN r4703
2013-04-12 00:54:53 +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
fe23727891 rename Value.h -> SILValue.h, missed it in the last pass.
Swift SVN r4592
2013-04-03 18:47:32 +00:00