-
Notifications
You must be signed in to change notification settings - Fork 45
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
Temporal merge #432
base: dev
Are you sure you want to change the base?
Temporal merge #432
Conversation
Not doing a full review, but you have 3 files that have been made executable, and you have a lot of non-conforming formatting. Please go through the patch yourself and review these kinds of things (clang-format is your friend for the latter). |
506dfea
to
6aab764
Compare
fc7e35b
to
669f902
Compare
…d to fetch all remaining symbols.
669f902
to
db2d723
Compare
I have rebased / gone over the commits with clang-format. |
@@ -4767,6 +4767,12 @@ bool SROA::splitAlloca(AllocaInst &AI, AllocaSlices &AS) { | |||
if (AllocaInst *NewAI = rewritePartition(AI, AS, P)) { | |||
Changed = true; | |||
if (NewAI != &AI) { | |||
|
|||
MDNode *Meta = AI.getMetadata("temporal"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry that other passes also drop metadata. I guess if it's only needed for allocas the risk is slightly reduced.
@@ -11,6 +11,30 @@ | |||
#include "llvm/Support/CommandLine.h" | |||
|
|||
using namespace llvm; | |||
using namespace escape; | |||
|
|||
static cl::opt<analysis_type> TemporalType( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to pass this as a global metadata node in the generated IR? If it's not present the pass isn't run (i.e. the default) and the when compiling for CheriOS clang adds the right metadata.
@@ -51,6 +51,12 @@ CheriCapabilityTableABI MCTargetOptions::cheriCapabilityTableABI() { | |||
return CapTableABI; | |||
} | |||
|
|||
static cl::opt<bool> IsCheriOSABI("is-cherios", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this should be part of the triple (riscv64-unknown-cherios) rather than a hidden -mllvm flag. It adds a bit more work since you need to copy-paste the useful bits of FreeBSD.cpp but is much cleaner than reusing the FreeBSD driver code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this depends on if I ever want CheriOS to compose with FreeBSD in some way. i.e. run the CheriOS style calling convention on FreeBSD.
@@ -301,6 +301,7 @@ bool MipsSubtarget::isABI_O32() const { return getABI().IsO32(); } | |||
bool MipsSubtarget::isABI_CheriPureCap() const { | |||
return getABI().IsCheriPureCap(); | |||
} | |||
bool MipsSubtarget::isABI_CheriOS() const { return getABI().IsCheriOS(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TM.getTargetTriple().getOS() == llvm::Triple::CheriOS
unsigned MipsABIInfo::GetReturnAddress() const { | ||
return IsCheriPureCap() ? | ||
Mips::C17 : | ||
(ArePtrs64bit() ? Mips::RA_64 : Mips::RA); | ||
} | ||
|
||
unsigned MipsABIInfo::GetFunctionAddress() const { return Mips::C12; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could change those to return MCRegister
now.
All the changes I have made for CheriOS.
Clang changes:
LLVM changes:
LLD changes: