mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
164b86b439
Problem: LLVM needs more function attributes than currently available (32 bits). One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc). Solution: - extend the Attributes from 32 bits to 64-bits - wrap the object into a class so that unsigned is never erroneously used instead - change "unsigned" to "Attributes" throughout the code, including one place in clang. - the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking. - the class has "safe operator bool()" to support the common idiom: if (Attributes attr = getAttrs()) useAttrs(attr); - The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls - Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work. - Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit. Tested: "make check" on Linux (32-bit and 64-bit) and Mac (10.6) built/run spec CPU 2006 on Linux with clang -O2. This change will break clang build in lib/CodeGen/CGCall.cpp. The following patch will fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148553 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
CommandGuide | ||
HistoricalNotes | ||
img | ||
tutorial | ||
AliasAnalysis.html | ||
Atomics.html | ||
BitCodeFormat.html | ||
BranchWeightMetadata.html | ||
Bugpoint.html | ||
CFEBuildInstrs.html | ||
CMake.html | ||
CodeGenerator.html | ||
CodingStandards.html | ||
CommandLine.html | ||
CompilerWriterInfo.html | ||
DebuggingJITedCode.html | ||
DeveloperPolicy.html | ||
doxygen.cfg.in | ||
doxygen.css | ||
doxygen.footer | ||
doxygen.header | ||
doxygen.intro | ||
ExceptionHandling.html | ||
ExtendedIntegerResults.txt | ||
ExtendingLLVM.html | ||
FAQ.html | ||
GarbageCollection.html | ||
GCCFEBuildInstrs.html | ||
GetElementPtr.html | ||
GettingStarted.html | ||
GettingStartedVS.html | ||
GoldPlugin.html | ||
HowToAddABuilder.html | ||
HowToReleaseLLVM.html | ||
HowToSubmitABug.html | ||
index.html | ||
LangRef.html | ||
Lexicon.html | ||
LinkTimeOptimization.html | ||
llvm.css | ||
LLVMBuild.html | ||
LLVMBuild.txt | ||
Makefile | ||
MakefileGuide.html | ||
Packaging.html | ||
Passes.html | ||
ProgrammersManual.html | ||
Projects.html | ||
re_format.7 | ||
ReleaseNotes.html | ||
SegmentedStacks.html | ||
SourceLevelDebugging.html | ||
SystemLibrary.html | ||
TableGenFundamentals.html | ||
TestingGuide.html | ||
WritingAnLLVMBackend.html | ||
WritingAnLLVMPass.html |