[PATCH] D59049: [Remarks] Add a new Remark / RemarkParser abstraction
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 6 13:53:18 PST 2019
thegameg created this revision.
thegameg added reviewers: paquette, anemet, JDevlieghere, hfinkel, fhahn.
Herald added a reviewer: deadalnix.
Herald added subscribers: jdoerfert, hiraditya, mgorny.
Herald added a project: LLVM.
This adds a Remark class that allows us to share code when working with remarks.
The C API has been updated to reflect this. Instead of the parser generating C structs, it's now using a C++ object that is used through opaque pointers in C. This gives us much more flexibility on what changes we can make to the internal state of the object and interacts much better with scenarios where the library is used through dlopen.
- C API updates:
- move from C structs to opaque pointers and functions
- the remark type is now an enum instead of a string
- unit tests updates:
- use mostly the C++ API
- keep one test for the C API
- rename to YAMLRemarksParsingTest
- a typo was fixed: AnalysisFPCompute -> AnalysisFPCommute.
- a new error message was added: "expected a remark tag."
- llvm-opt-report has been updated to use the C++ parser instead of the C API
https://reviews.llvm.org/D59049
Files:
llvm/include/llvm-c/Remarks.h
llvm/include/llvm/Remarks/Remark.h
llvm/include/llvm/Remarks/RemarkParser.h
llvm/lib/Remarks/CMakeLists.txt
llvm/lib/Remarks/Remark.cpp
llvm/lib/Remarks/RemarkParser.cpp
llvm/lib/Remarks/RemarkParserImpl.h
llvm/lib/Remarks/YAMLRemarkParser.cpp
llvm/lib/Remarks/YAMLRemarkParser.h
llvm/tools/llvm-opt-report/OptReport.cpp
llvm/tools/remarks-shlib/Remarks.exports
llvm/unittests/Remarks/CMakeLists.txt
llvm/unittests/Remarks/RemarksParsingTest.cpp
llvm/unittests/Remarks/YAMLRemarksParsingTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59049.189582.patch
Type: text/x-patch
Size: 90528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190306/14885ee4/attachment-0001.bin>
More information about the llvm-commits
mailing list