- User Since
- Jul 6 2021, 10:22 AM (11 w, 4 d)
Jul 29 2021
Could you please take another look, @MaskRay?
Add reference to the bug report for reading metadata operand bundle values out
Use stable iteration order and adapt tests
Adapt tests to stable function order, refactor FunctionInfo::DirectCallSite
Use stable iteration order for functions
ADd further docs for FunctionKind
Return error if operand bundle value type cannot be parsed
Abandoning this revision as it is split.
Jul 28 2021
Please mark the following bug report resolved when this is fixed: https://bugs.llvm.org/show_bug.cgi?id=51264
Abandoning this revision since it is split to two:
Add function begin symbol for call graph section if does not exist
Jul 22 2021
Fix nits in documentation and tests
Refactor extracting and setting type id
Create a constructor for CallSiteInfo that takes a CallBase instance to encapsulate extracting and setting type id, and any warnings/assertions.
Add typeId to callSites YAML format, add tests
- MIRPrinter/MIRParser: Parse/print CallSiteInfo::TypeId. This also enables better testing of the feature.
- Add tests: Test MIRPrinter/MIRParser. Test that call site type ids can be extracted and set from type operand bundles.
- Fix nits.
MipsISelLowering: Fill CallSiteInfo::ArgRegPairs only if -emit-call-site-info
ArgRegPairs was always filled but the container CallSiteInfo instance was only passed to DAG if -emit-call-site-info. Now we pass the CallSiteInfo instance to DAG when --call-graph-section as well. Avoid superfluous ArgRegPairs by filling them only when -emit-call-site-info.
Several fixes and refactoring
- Emit call graph section per function right after the function information is gathered rather than collection all and emitting once. This simplifies the code with less book keeping. Also, emitting the section at AsmPrinter::doFinalization() was wrong, leading to linker issues when section is not linked with function symbol.
- Use function begin symbol as function entry label in call graph section. Avoid emitting yet another temp symbol.
- Fix MCObjectFileInfo::getCallGraphSection(). Create section based on text section instead of the function symbol.
- Move FunctionKind to AsmPrinter::FunctionInfo to make the FunctionKind values clear to call graph section consumers.
- Propagate some more call graph section logic from AsmPrinter::emitFunctionBody() to AsmPrinter::emitCallGraphSection(). This also means less bookkeeping in AsmPrinter::FunctionInfo.
Verify type operand bundle usage
- Check if type operand bundle id is drifted
- Verify and complain if multiple type operand bundles are used
- Add type operand bundle test to operand bundle verifier tests
Jul 21 2021
This is needed for D105909 since it attaches type identifiers to call sites as operand bundles with metadata value. Now we can successfully compile LLVM IR with metadata operand bundles to object file while preserving the bundle value.
D106523 fixes the issue with llc by parsing metadata value from operand bundles. The test case will pass with this fix.
Fix creating call graph section
- For call graph section, set SHF_GROUP if the text section has.
- Remove XFAIL from test. A seperate revision to fix llc will be sent.
- Fix nits.
Fix small nits
Jul 17 2021
Adapt to the new call graph section layout, refactor
- Parse the call graph section based on the new section layout
- Refactor code for readability and efficiency
- Account for functions that call graph section has no info for, and them as indirect target with unknown type id.
- Add additional warning messages (for functions that call graph section has no info for)
Adapt to new call graph section layout, no longer use comdats
- Emit the call graph section following the new call graph section layout.
- No longer use comdats. Instead, use only SHF_LINK_ORDER to link call graph sections to function symbols.
- The code is refactored with usage of better data-structures. This increased the readability and the efficiency.
Change call graph section layout
Jul 16 2021
Extract callsite type ids from operand bundles instead of from metadata
- Parent commit now passes callsite type ids through operand bundles. Adapt type id extraction to the changes.
- Fix a few nits
Please disregard this revision.
Use operand bundles for callsite type ids
- Use (unlossy) operand bundles for propagating indirect callsite type ids
- No longer use type metadata for indirect callsites
- Adapt the tests to the changes
Jul 15 2021
- test new clang flags
- add C struct parameter test
- add C++ tests
Jul 13 2021
Several review comments are addressed
rebase, fix nits in docs
This revision was created by mistake . Please disregard.