-
Notifications
You must be signed in to change notification settings - Fork 78
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
update llir/llvm to support LLVM 10.0 #128
Comments
This comment has been minimized.
This comment has been minimized.
Yeah, lets wait until 10.0 is released. I was just excited :) |
LLVM release candidate 5 is out. We are getting closer :) |
LLVM 10.0 has finally been released! @dannypsnl, do you wanna take a look at updating |
This comment has been minimized.
This comment has been minimized.
LLVM 10.0 Changes Report
TODO:
freeze instruction@@ -5788,8 +5815,21 @@ int LLParser::ParseInstruction(Instruction *&Inst, BasicBlock *BB,
case lltok::kw_extractelement: return ParseExtractElement(Inst, PFS);
case lltok::kw_insertelement: return ParseInsertElement(Inst, PFS);
case lltok::kw_shufflevector: return ParseShuffleVector(Inst, PFS);
- case lltok::kw_phi: return ParsePHI(Inst, PFS);
+ case lltok::kw_phi: {
+ FastMathFlags FMF = EatFastMathFlagsIfPresent();
+ int Res = ParsePHI(Inst, PFS);
+ if (Res != 0)
+ return Res;
+ if (FMF.any()) {
+ if (!isa<FPMathOperator>(Inst))
+ return Error(Loc, "fast-math-flags specified for phi without "
+ "floating-point scalar or vector return type");
+ Inst->setFastMathFlags(FMF);
+ }
+ return 0;
+ }
case lltok::kw_landingpad: return ParseLandingPad(Inst, PFS);
+ case lltok::kw_freeze: return ParseFreeze(Inst, PFS);
// Call.
case lltok::kw_call: return ParseCall(Inst, PFS, CallInst::TCK_None);
case lltok::kw_tail: return ParseCall(Inst, PFS, CallInst::TCK_Tail);
+/// ParseFreeze
+/// ::= 'freeze' Type Value
+bool LLParser::ParseFreeze(Instruction *&Inst, PerFunctionState &PFS) {
+ LocTy Loc;
+ Value *Op;
+ if (ParseTypeAndValue(Op, Loc, PFS))
+ return true;
+
+ Inst = new FreezeInst(Op);
+ return false;
+} |
From the "Parse errors" section of #132 (comment) a couple of test cases are listed for which we need to update the grammar to LLVM 10.0. They include:
|
@dannypsnl, is it only the |
(llir/llvm#128) instruction: freeze
* (llir/llvm#128) instruction: freeze TODO: update grammar repo once PR merged * (llir/llvm#128) update grammar
* (#128) instruction: freeze TODO: update submodule ll once PR merged. * apply suggestions from code review These suggestions are obviously correct. The rest of suggestions I would take a look at tonight. Co-Authored-By: Robin Eklind <[email protected]> * (#128) update submodule: ll * (#128) move freeze instruction and add Typ field Co-authored-by: Robin Eklind <[email protected]>
With #137 merged, all new language concepts of LLVM 10.0 have been added to What remains to add for LLVM 10.0 is only enum values. From #132 (comment)
@@ -585,6 +585,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(ccc);
KEYWORD(fastcc);
KEYWORD(coldcc);
+ KEYWORD(cfguard_checkcc);
KEYWORD(x86_stdcallcc);
KEYWORD(x86_fastcallcc);
KEYWORD(x86_thiscallcc);
@@ -593,6 +594,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(arm_aapcscc);
KEYWORD(arm_aapcs_vfpcc);
KEYWORD(aarch64_vector_pcs);
+ KEYWORD(aarch64_sve_vector_pcs);
KEYWORD(msp430_intrcc);
KEYWORD(avr_intrcc);
KEYWORD(avr_signalcc);
@@ -622,6 +624,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(amdgpu_ps);
KEYWORD(amdgpu_cs);
KEYWORD(amdgpu_kernel);
+ KEYWORD(tailcc);
|
After merging #128 and llir/testdata#6, the only test case remaining for LLVM 10.0 integration is testdata/llvm/test/Bitcode/calling-conventions.3.2.ll.
|
(llir/llvm#128) new calling conventions
(llir/llvm#128) new calling conventions
@dannypsnl I think with #140 merged, we are now ready to close this issue as |
This is a meta issue tracking the progress to support LLVM 10.0 in llir/llvm.
For reference, it will be very similar to the work done to support LLVM 9.0.
In particular, we need to:
Release candidate 2 of LLVM 10.0 was tagged on the 11th of February, and the final release is scheduled for the 26th of February.
cc: @dannypsnl would you care to take a look at this? I can help out if you get stuck anywhere. I tried to write in the issues (#101, #105 and #106 and associated PRs) how we did this last time :) Just let me know if anything feels unclear.
Cheers,
Robin
The text was updated successfully, but these errors were encountered: