[PATCH] D152914: [Draft] Make __builtin_cpu builtins target-independent
Nemanja Ivanovic via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 14 06:45:27 PDT 2023
nemanjai created this revision.
nemanjai added reviewers: PowerPC, RKSimon, pengfei, arsenm, t.p.northover.
Herald added subscribers: steven.zhang, kbarton, hiraditya.
Herald added a project: All.
nemanjai requested review of this revision.
Herald added subscribers: jdoerfert, wdng.
Herald added projects: clang, LLVM.
This is just a proposal patch for a possible direction we can extend these builtins to other targets as well as an implementation for PowerPC.
This adds a new instruction similar to `LOAD_STACK_GUARD` that is meant to load things from fixed addresses. The new instruction has semantics that are a superset of what `LOAD_STACK_GUARD` does so the two can be folded into one.
My hope with this patch is to collect feedback from the community about the direction, so please provide any feedback you may have.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152914
Files:
clang/include/clang/Basic/Builtins.def
clang/include/clang/Basic/BuiltinsX86.def
clang/include/clang/Basic/TargetInfo.h
clang/lib/Basic/Targets/PPC.cpp
clang/lib/Basic/Targets/PPC.h
clang/lib/Basic/Targets/X86.h
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Sema/SemaChecking.cpp
clang/test/CodeGen/builtin-cpu-supports.c
clang/test/Sema/builtin-cpu-supports.c
llvm/include/llvm/Analysis/TargetLibraryInfo.h
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/include/llvm/IR/Intrinsics.td
llvm/include/llvm/Support/TargetOpcodes.def
llvm/include/llvm/Target/Target.td
llvm/include/llvm/TargetParser/PPCTargetParser.def
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
llvm/lib/Target/PowerPC/PPCSubtarget.h
llvm/lib/Target/PowerPC/PPCTargetMachine.h
llvm/test/CodeGen/PowerPC/cpu-supports.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152914.531306.patch
Type: text/x-patch
Size: 37604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230614/8a43d135/attachment-0001.bin>
More information about the cfe-commits
mailing list