Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM 11 rebase #5

Open
wants to merge 14 commits into
base: upstream-llvm11-snapshot
Choose a base branch
from
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ const MCExpr *TargetLoweringObjectFileCOFF::lowerRelativeReference(
static std::string APIntToHexString(const APInt &AI) {
unsigned Width = (AI.getBitWidth() / 8) * 2;
std::string HexString = AI.toString(16, /*Signed=*/false);
transform(HexString.begin(), HexString.end(), HexString.begin(), tolower);
transform(HexString, HexString.begin(), ::tolower);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this change be squashed into a previous commit?

unsigned Size = HexString.size();
assert(Width >= Size && "hex string is too large!");
HexString.insert(HexString.begin(), Width - Size, '0');
Expand Down
1 change: 1 addition & 0 deletions llvm/lib/Target/RISCV/ISPAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/Support/TargetRegistry.h"
#include "TargetInfo/RISCVTargetInfo.h"

#include "ISP.h"

Expand Down
4 changes: 4 additions & 0 deletions llvm/lib/Target/RISCV/RISCVAsmPrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/ADT/Statistic.h"

#define DEBUG_TYPE "asm-printer"

using namespace llvm;

STATISTIC(RISCVNumInstrsCompressed,
"Number of RISC-V Compressed instructions emitted");

class RISCVAsmPrinter : public AsmPrinter {
public:
explicit RISCVAsmPrinter(TargetMachine &TM,
Expand Down