This is an archive of the discontinued LLVM Phabricator instance.

Take OptimizationLevel class out of Pass Builder
ClosedPublic

Authored by tarinduj on Jul 28 2021, 8:55 PM.

Details

Summary

Pulled out the OptimizationLevel class from PassBuilder in order to be able to access it from within the PassManager and avoid include conflicts.

Diff Detail

Event Timeline

tarinduj created this revision.Jul 28 2021, 8:55 PM
tarinduj requested review of this revision.Jul 28 2021, 8:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2021, 8:55 PM
mtrofin added inline comments.Jul 28 2021, 9:28 PM
llvm/include/llvm/Passes/OptimizationLevel.h
15

this should be in the llvm namespace

16

Make sure this has a header guard - i.e. a
#ifndef LLVM_PASSES_OPTIMIZATIONLEVEL_H
#define LLVM_PASSES_OPTIMIZATIONLEVEL_H
... the file
#endif

22

you're probably missing some #include; for assert, it's <assert.h>

tarinduj updated this revision to Diff 362675.EditedJul 29 2021, 1:49 AM

added namespace, header guards, and the include

tarinduj updated this revision to Diff 362692.Jul 29 2021, 2:43 AM

clang-format

mtrofin accepted this revision.Jul 29 2021, 8:01 AM
mtrofin added inline comments.
llvm/include/llvm/Passes/OptimizationLevel.h
128

add a newline here (it helps diff tools)

This revision is now accepted and ready to land.Jul 29 2021, 8:01 AM
tarinduj updated this revision to Diff 362962.Jul 29 2021, 8:06 PM

added newline at the end to OptimizationLevel.h

This revision was landed with ongoing or failed builds.Jul 29 2021, 9:57 PM
This revision was automatically updated to reflect the committed changes.