Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: src/IceTargetLowering.cpp

Issue 1591893002: Subzero: Improve the usability of UnimplementedError during lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLowering.cpp
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp
index 28a7ca7828fa8c2c059f97e58bc22a738b9156a6..bd5c11b47e4fd0548a6084bf3a0c75a4516f0f42 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -459,6 +459,26 @@ void TargetLowering::markRedefinitions() {
}
}
+void TargetLowering::addFakeDefUses(const Inst *Instr) {
+ FOREACH_VAR_IN_INST(Var, *Instr) {
+ if (auto *Var64 = llvm::dyn_cast<Variable64On32>(Var)) {
+ Context.insert<InstFakeUse>(Var64->getLo());
+ Context.insert<InstFakeUse>(Var64->getHi());
+ } else {
+ Context.insert<InstFakeUse>(Var);
+ }
+ }
+ Variable *Dest = Instr->getDest();
+ if (Dest == nullptr)
+ return;
+ if (auto *Var64 = llvm::dyn_cast<Variable64On32>(Dest)) {
+ Context.insert<InstFakeDef>(Var64->getLo());
+ Context.insert<InstFakeDef>(Var64->getHi());
+ } else {
+ Context.insert<InstFakeDef>(Dest);
+ }
+}
+
void TargetLowering::sortVarsByAlignment(VarList &Dest,
const VarList &Source) const {
Dest = Source;
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698