[all-commits] [llvm/llvm-project] 9efce0: [clang] Run LLVM Verifier in modes without CodeGen...
Itay Bookstein via All-commits
all-commits at lists.llvm.org
Tue Nov 9 13:57:28 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9efce0baee4bdda9d824716668ac3d3027bfa318
https://github.com/llvm/llvm-project/commit/9efce0baee4bdda9d824716668ac3d3027bfa318
Author: Itay Bookstein <ibookstein at gmail.com>
Date: 2021-11-09 (Tue, 09 Nov 2021)
Changed paths:
M clang/lib/CodeGen/BackendUtil.cpp
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/test/CodeGen/lto-newpm-pipeline.c
Log Message:
-----------
[clang] Run LLVM Verifier in modes without CodeGen too
Previously, the Backend_Emit{Nothing,BC,LL} modes did
not run the LLVM verifier since it is usually added via
the TargetMachine::addPassesToEmitFile method according
to the DisableVerify parameter. This is called from
EmitAssemblyHelper::AddEmitPasses, which is only relevant
for BackendAction-s that require CodeGen.
Note:
* In these particular situations the verifier is added
to the optimization pipeline rather than the codegen
pipeline so that it runs prior to the BC/LL emission
pass.
* This change applies to both the old and the new PMs.
* Because the clang tests use -emit-llvm ubiquitously,
this change will enable the verifier for them.
* A small bug is fixed in emitIFuncDefinition so that
the clang/test/CodeGen/ifunc.c test would pass:
the emitIFuncDefinition incorrectly passed the
GlobalDecl of the IFunc itself to the call to
GetOrCreateLLVMFunction for creating the resolver.
Signed-off-by: Itay Bookstein <ibookstein at gmail.com>
Reviewed By: rjmccall
Differential Revision: https://reviews.llvm.org/D113352
More information about the All-commits
mailing list