[all-commits] [llvm/llvm-project] bf36e9: [GlobalISel][CallLowering] NFC: Unify flag-setting...
Jessica Paquette via All-commits
all-commits at lists.llvm.org
Tue Aug 18 11:09:32 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: bf36e902953a4bf8ac0aae5a498445951fbc3882
https://github.com/llvm/llvm-project/commit/bf36e902953a4bf8ac0aae5a498445951fbc3882
Author: Jessica Paquette <jpaquette at apple.com>
Date: 2020-08-18 (Tue, 18 Aug 2020)
Changed paths:
M llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h
M llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
Log Message:
-----------
[GlobalISel][CallLowering] NFC: Unify flag-setting from CallBase + AttributeList
It's annoying to have to maintain multiple, nearly identical chains of if
statements which all set the same attributes.
Add a helper function, `addFlagsUsingAttrFn` which performs the attribute
setting.
Then, use wrappers for that function in `lowerCall` and `setArgFlags`.
(Note that the flag-setting code in `setArgFlags` was missing the returned
attribute. There's no selection for this yet, so no test. It's an example of
the kind of thing this lets us avoid, though.)
Differential Revision: https://reviews.llvm.org/D86159
More information about the All-commits
mailing list