This is an archive of the discontinued LLVM Phabricator instance.

[gicombiner] Add a CodeExpander to handle C++ fragments with variable expansion
ClosedPublic

Authored by dsanders on Oct 1 2019, 11:50 AM.

Event Timeline

dsanders created this revision.Oct 1 2019, 11:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 1 2019, 11:50 AM
Herald added a subscriber: mgorny. · View Herald Transcript
volkan accepted this revision.Oct 2 2019, 11:58 AM

LGTM.

This revision is now accepted and ready to land.Oct 2 2019, 11:58 AM
volkan added inline comments.Oct 2 2019, 12:00 PM
llvm/utils/TableGen/GlobalISel/CMakeLists.txt
6

Nit: extra whitespace

This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Oct 2 2019, 6:24 PM
thakis added inline comments.
llvm/trunk/utils/TableGen/GlobalISel/CMakeLists.txt
5 ↗(On Diff #222946)

Out of interest, why is this an object library instead of a normal STATIC library?

dsanders marked an inline comment as done.Oct 2 2019, 6:31 PM
dsanders added inline comments.
llvm/trunk/utils/TableGen/GlobalISel/CMakeLists.txt
5 ↗(On Diff #222946)

I assume you're asking because some of the bots are failing. AFAICT it's the ones with older cmakes.

I went with an object library because it doesn't need to be an actual library. It's just a means to include them in the llbm-tblgen link. Switching to a STATIC library might be how I end up fixing it.

thakis added inline comments.Oct 3 2019, 1:02 PM
llvm/trunk/utils/TableGen/GlobalISel/CMakeLists.txt
5 ↗(On Diff #222946)

No, I asked out of interest, like I said :)

Most libraries in LLVM don't need to be an actual library. It's just the usual unit of abstraction for a bunch of files. The index therein and their load semantics tend to be good for binary size.

dsanders marked an inline comment as done.Oct 3 2019, 1:27 PM
dsanders added inline comments.
llvm/trunk/utils/TableGen/GlobalISel/CMakeLists.txt
5 ↗(On Diff #222946)

Ah it was just coincidental timing then :-). Your question arrived in the middle of twenty or so bot failure emails about older cmake's not liking the object library.

The index therein and their load semantics tend to be good for binary size.

I'm a bit curious about this as a static library (on Linux and macOS at least) is just the object files inside an 'ar' archive. I'm not aware of any functional difference (other than the existence of the static library) between linking a static library and linking the object files directly. Are you on a platform where that's not the case? or is there something about static libraries that I'm not aware of?