David Zarzycki
d532fdefe0
[SIL] NFC: Migrate AllocRefInstBase subclasses to InstructionBaseWithTrailingOperands
2017-12-27 08:00:20 -05:00
David Zarzycki
26a1187a3a
[SIL] NFC: Migrate CondBranchInst to InstructionBaseWithTrailingOperands
...
Also, repack misc bits and stop hard coding the number of fixed operands.
2017-12-26 07:39:59 -05:00
David Zarzycki
32284f1023
[SIL] NFC: Migrate ObjectInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:59 -05:00
David Zarzycki
9f42304dd7
[SIL] NFC: Migrate MarkFunctionEscapeInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:59 -05:00
David Zarzycki
81c29d7f98
[SIL] NFC: Migrate SwitchValueInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:59 -05:00
David Zarzycki
bc31a3542f
[SIL] NFC: Migrate YieldInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:59 -05:00
David Zarzycki
25b85596b2
[SIL] NFC: Migrate BranchInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:59 -05:00
David Zarzycki
2dc1917283
[SIL] NFC: Migrate AllocBoxInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:59 -05:00
David Zarzycki
2630944535
[SIL] NFC: Migrate AllocExistentialBoxInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:59 -05:00
David Zarzycki
f572569fb1
[SIL] NFC: Migrate BuiltinInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:59 -05:00
David Zarzycki
33300640ae
[SIL] NFC: Migrate BindMemoryInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:59 -05:00
David Zarzycki
d2552969f6
[SIL] NFC: Migrate StructInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:59 -05:00
David Zarzycki
65a31cf113
[SIL] NFC: Migrate TupleInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:59 -05:00
David Zarzycki
1321eceb0c
[SIL] NFC: Migrate MetatypeInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:58 -05:00
David Zarzycki
ee0550ecdf
[SIL] NFC: Migrate WitnessMethodInst to InstructionBaseWithTrailingOperands
2017-12-26 07:39:58 -05:00
David Zarzycki
09d541f758
[SIL] NFC: Refactor UnaryInstructionWithTypeDependentOperandsBase
...
Refactor UnaryInstructionWithTypeDependentOperandsBase into two template
classes, where the original template now subclasses a simpler template
called "InstructionBaseWithTrailingObjects".
2017-12-26 07:39:58 -05:00
David Zarzycki
ed85954275
[SIL] NFC: Migrate TupleInst to llvm::TrailingObjects
...
Also, repack the count variable into the misc object header bits.
2017-12-22 11:33:47 -05:00
David Zarzycki
83c1054034
[SIL] NFC: Migrate StructInst to llvm::TrailingObjects
...
Also, repack the count variable into the misc object header bits.
2017-12-22 11:16:33 -05:00
David Zarzycki
5012a80e39
[SIL] NFC: Repack misc StringLiteralInst bits
2017-12-22 10:58:21 -05:00
David Zarzycki
fcfdd4c8ca
[SIL] NFC: Migrate BuiltinInst to llvm::TrailingObjects
...
Also, repack the count variables into the misc object header bits.
2017-12-22 10:29:41 -05:00
Chris Lattner
00e961e5f2
Teach the SILPrinter to be more resilient to null operands.
...
Previously, when in the debugger and dumping out SIL code, the
printer would crash if it encountered a null operand. If you
are dumping a basic block, this means that the dump stops at
that instruction instead of showing you the whole block. Null
operands can happen when you call dropAllReferences() but have
yet to delete the instruction.
Now the printer is a bit more resilient. We probably don't catch
all the cases, but we handle a lot of them, e.g.:
%116 = apply <<NULL OPERAND>>(<<NULL OPERAND>>, <<NULL OPERAND>>) : <<NULL CALLEE>>
debug_value <<NULL OPERAND>>, let, name "c", argno 1 // id: %120
retain_value <<NULL OPERAND>> // id: %138
Since this is only relevant to invalid IR, this is just
a debugging aid, so no testcase.
2017-12-21 14:29:56 -08:00
Slava Pestov
37b4aa934b
Merge pull request #13549 from slavapestov/class-resilience-part-7a
...
Code review feedback from "class resilience part 7"
2017-12-20 15:21:53 -08:00
Chris Lattner
0c6e0c25a1
Two NFC changes:
...
- Add a DominanceInfo::dominates helper functions that takes two instructions,
as analogues to the properlyDominates ones.
- Further generalize some SILBuilder code to be more defensive in the face
of incorrect or partially constructed SIL instructions.
These are cleanups, NFC.
2017-12-19 20:18:24 -08:00
Slava Pestov
5464eb5166
SIL: Add back missing include
...
We need ErrorHandling.h for llvm_unreachable(). Include it
explicitly instead of relying on a transitive include.
2017-12-19 17:39:17 -08:00
Michael Gottesman
1209592421
Merge pull request #13536 from gottesmm/rdar_36032876
...
In SILCodeMotion, be sure to invalidate global enum tag dataflow state when deleting instructions
2017-12-19 16:09:16 -08:00
Michael Gottesman
7819c4d41a
[sil] Add const to int SILBasicBlock::getDebugId().
...
This is a read only function. This just allows one to call it in more places.
rdar://36032876
2017-12-19 10:10:12 -08:00
Slava Pestov
4d18e923d4
SIL: Clean up includes
2017-12-19 02:00:25 -08:00
Slava Pestov
fa719f75bd
SIL: SILVTableVisitor no longer needs a TypeLowering reference
2017-12-18 23:28:33 -08:00
Slava Pestov
c16c2c35bf
SIL: Move getOverriddenVTableEntry() from TypeLowering to SILDeclRef
...
There's no reason for this to be an instance method on the TypeLowering
object, because it (no longer?) uses any type lowering operations.
2017-12-18 23:28:33 -08:00
swift-ci
3ce4db2966
Merge pull request #13511 from anemet/opt-remark-spec-devirt
2017-12-18 15:20:54 -08:00
Adam Nemet
5d7b8106c3
Add opt-remarks to the Speculative Devirtualizer pass
2017-12-18 13:29:46 -08:00
John McCall
94116347a2
Fix some warnings: extra semicolons, anonymous structs.
2017-12-18 15:31:47 -05:00
David Zarzycki
c75e8299f1
[SIL] NFC: Repack misc MetatypeInst bits
2017-12-17 21:35:27 -05:00
David Zarzycki
bc44e5a150
[SIL] NFC: Repack misc BeginAccessInst bits
2017-12-17 21:23:37 -05:00
David Zarzycki
931ea24f99
[SIL] NFC: Repack misc EndAccessInst bits
2017-12-17 21:14:49 -05:00
David Zarzycki
1cd19eae36
[SIL] NFC: Repack misc PointerToAddressInst bits
2017-12-17 20:58:45 -05:00
David Zarzycki
315cf677dd
[SIL] NFC: Repack misc SwitchValueInst bits
2017-12-17 20:54:01 -05:00
David Zarzycki
5443923a0c
[SIL] NFC: Repack misc SwitchEnumInstBase bits
2017-12-17 20:24:14 -05:00
David Zarzycki
f0bd535261
[SIL] NFC: Repack misc TupleElementAddrInst bits
2017-12-17 19:58:24 -05:00
David Zarzycki
cf443ecfcf
[SIL] NFC: Repack misc TupleExtractInst bits
2017-12-17 19:55:17 -05:00
David Zarzycki
b885daf032
[SIL] NFC: Repack misc WitnessMethodInst bits
2017-12-17 19:49:37 -05:00
David Zarzycki
224b8495bc
[SIL] NFC: Repack misc DeallocRefInst bits
2017-12-16 19:26:40 -05:00
David Zarzycki
83546faec8
[SIL] NFC: Repack misc IntegerLiteralInst and FloatLiteralInst bits
2017-12-16 19:12:01 -05:00
David Zarzycki
aef2e8c662
[SIL] NFC: Repack misc LoadInst bits
2017-12-16 18:53:08 -05:00
David Zarzycki
c4e90d6e4f
[SIL] NFC: Repack misc StoreInst bits
2017-12-16 18:41:14 -05:00
David Zarzycki
c8a458ed1d
[SIL] NFC: Repack misc CopyAddrInst bits
2017-12-16 18:31:46 -05:00
David Zarzycki
b5424c0c17
[SIL] NFC: Repack misc StrongPinInst bits
2017-12-16 18:22:52 -05:00
David Zarzycki
edcb0114c4
[SIL] NFC: Repack misc LoadReferenceInstBase bits
2017-12-16 18:04:49 -05:00
David Zarzycki
f6957eade8
[SIL] NFC: Repack misc StoreReferenceInstBase bits
2017-12-16 18:00:08 -05:00
David Zarzycki
a0a5ca5f14
[SIL] NFC: Repack misc RefCountingInst bits
2017-12-16 17:43:31 -05:00