Fix build breakage caused by #176061 (#176283)
https://github.com/llvm/llvm-project/pull/176061 added an extern
declaration of `EnableMachineCombinerPass`, which is `static`, causing
missing symbol errors in the debug build. This PR fixes this by making
that symbol non-static. Furthermore, this PR renames that symbol to
`X86EnableMachineCombinerPass` as `EnableMachineCombinerPass` exists in
other places.
[LLDB][NativePDB] Add PdbAstBuilder null checks (#176065)
`TypeSystem::GetNativePDBParser` returns `nullptr` by default, so using
the result without checking can cause a crash.
[acc] Fix OpenACCUtilsTest to avoid leak in isDeviceValueNonMappableType (#176269)
The problem is that the operation is created without an owner, then
there is no free. This is being caught in llvm buildbots that are testing
sanitizers.
[LLVM][Utils] Do not error with dirty dir for untracked files (#176246)
If someone has untracked files in their tree and they attempt to use the
script, it will error out after processing the first commit complaining
about a dirty working tree. This patch fixes that by making
_check_work_tree look at the git status --porcelain output to ensure it
finds entries are not prefixed with a ?, which corresponds to an
untracked file.
Fixes #174592
[RISCV] Handle a split 2*XLen argument before pushing to PendingLocs. (#176183)
Previously we pushed the second part to PendingLocs first, but never
used it since the all values were still in variables.
[X86][NewPM] Fill out X86CodeGenPassBuilder (#176061)
This patch fills out X86CodeGenPassBuilder a decent amount of the way.
Comments are added where we either need more CodeGenPassBuilder hooks or
have not yet ported passes. This is intended to be a simple mapping of
the existing X86PassConfig and does not intend to make any improvements
or fix any existing issues (like using non fast-regalloc at O0 with AMX
instructions).
[Clang][NFC] Replace device specific kernel attribute with generic one (#176250)
Summary:
The old `amdgpu_kernel` and `nvptx_kernel` attributes are better
replaced by the new, generic `device_kernel`.
DAG: Avoid querying libcall info from TargetLowering
Libcall lowering decisions should come from the LibcallLoweringInfo
analysis. Query this through the DAG, so eventually the source
can be the analysis. For the moment this is just a wrapper around
the TargetLowering information.
GlobalISel: Use LibcallLoweringInfo analysis in legalizer
This is mostly boilerplate to move various freestanding utility
functions into LegalizerHelper. LibcallLoweringInfo is currently
optional, mostly because threading it through assorted other
uses of LegalizerHelper is more difficult.
I had a lot of trouble getting this to work in the legacy pass
manager with setRequiresCodeGenSCCOrder, and am not happy with the
result. A sub-pass manager is introduced and this is invalidated,
so we're re-computing this unnecessarily.
IR: Promote "denormal-fp-math" to a first class attribute
Convert "denormal-fp-math" and "denormal-fp-math-f32" into a first
class denormal_fpenv attribute. Previously the query for the effective
deormal mode involved two string attribute queries with parsing. I'm
introducing more uses of this, so it makes sense to convert this
to a more efficient encoding. The old representation was also awkward
since it was split across two separate attributes. The new encoding
just stores the default and float modes as bitfields, largely avoiding
the need to consider if the other mode is set.
The syntax in the common cases looks like this:
`denormal_fpenv(preservesign,preservesign)`
`denormal_fpenv(float: preservesign,preservesign)`
`denormal_fpenv(dynamic,dynamic float: preservesign,preservesign)`
I wasn't sure about reusing the float type name instead of adding a
new keyword. It's parsed as a type but only accepts float. I'm also
debating switching the name to subnormal to match the current
[18 lines not shown]