mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-06 03:19:50 +00:00
Infer mayload
llvm-svn: 45819
This commit is contained in:
parent
3aa2fc1b5c
commit
bd352f9008
@ -205,7 +205,7 @@ void InstrInfoEmitter::InferFromPattern(const CodeGenInstruction &Inst,
|
||||
|
||||
InstAnalyzer(CDP, mayStore, mayLoad,NeverHasSideEffects).Analyze(Inst.TheDef);
|
||||
|
||||
// InstAnalyzer only correctly analyzes mayStore so far.
|
||||
// InstAnalyzer only correctly analyzes mayStore/mayLoad so far.
|
||||
if (Inst.mayStore) { // If the .td file explicitly sets mayStore, use it.
|
||||
// If we decided that this is a store from the pattern, then the .td file
|
||||
// entry is redundant.
|
||||
@ -217,8 +217,18 @@ void InstrInfoEmitter::InferFromPattern(const CodeGenInstruction &Inst,
|
||||
mayStore = true;
|
||||
}
|
||||
|
||||
// These two override everything.
|
||||
mayLoad = Inst.mayLoad;
|
||||
if (Inst.mayLoad) { // If the .td file explicitly sets mayLoad, use it.
|
||||
// If we decided that this is a load from the pattern, then the .td file
|
||||
// entry is redundant.
|
||||
if (mayLoad)
|
||||
fprintf(stderr,
|
||||
"Warning: mayLoad flag explicitly set on instruction '%s'"
|
||||
" but flag already inferred from pattern.\n",
|
||||
Inst.TheDef->getName().c_str());
|
||||
mayLoad = true;
|
||||
}
|
||||
|
||||
|
||||
NeverHasSideEffects = Inst.neverHasSideEffects;
|
||||
|
||||
#if 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user