mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
mark all the generated node predicates 'const'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96337 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -64,7 +64,7 @@ namespace {
|
|||||||
/// that the bits 1-7 of LHS are already zero. If LHS is non-null, we are
|
/// that the bits 1-7 of LHS are already zero. If LHS is non-null, we are
|
||||||
/// in checking mode. If LHS is null, we assume that the mask has already
|
/// in checking mode. If LHS is null, we assume that the mask has already
|
||||||
/// been validated before.
|
/// been validated before.
|
||||||
uint64_t get_zapImm(SDValue LHS, uint64_t Constant) {
|
uint64_t get_zapImm(SDValue LHS, uint64_t Constant) const {
|
||||||
uint64_t BitsToCheck = 0;
|
uint64_t BitsToCheck = 0;
|
||||||
unsigned Result = 0;
|
unsigned Result = 0;
|
||||||
for (unsigned i = 0; i != 8; ++i) {
|
for (unsigned i = 0; i != 8; ++i) {
|
||||||
|
@ -270,14 +270,14 @@ void DAGISelEmitter::EmitPredicateFunctions(raw_ostream &OS) {
|
|||||||
|
|
||||||
if (P->getOnlyTree()->isLeaf())
|
if (P->getOnlyTree()->isLeaf())
|
||||||
OS << "inline bool Predicate_" << PatFragRecord->getName()
|
OS << "inline bool Predicate_" << PatFragRecord->getName()
|
||||||
<< "(SDNode *N) {\n";
|
<< "(SDNode *N) const {\n";
|
||||||
else {
|
else {
|
||||||
std::string ClassName =
|
std::string ClassName =
|
||||||
CGP.getSDNodeInfo(P->getOnlyTree()->getOperator()).getSDClassName();
|
CGP.getSDNodeInfo(P->getOnlyTree()->getOperator()).getSDClassName();
|
||||||
const char *C2 = ClassName == "SDNode" ? "N" : "inN";
|
const char *C2 = ClassName == "SDNode" ? "N" : "inN";
|
||||||
|
|
||||||
OS << "inline bool Predicate_" << PatFragRecord->getName()
|
OS << "inline bool Predicate_" << PatFragRecord->getName()
|
||||||
<< "(SDNode *" << C2 << ") {\n";
|
<< "(SDNode *" << C2 << ") const {\n";
|
||||||
if (ClassName != "SDNode")
|
if (ClassName != "SDNode")
|
||||||
OS << " " << ClassName << " *N = cast<" << ClassName << ">(inN);\n";
|
OS << " " << ClassName << " *N = cast<" << ClassName << ">(inN);\n";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user