core: reduce code duplication in codegen/llvm_intrinsic #450

Merged
sb10q merged 2 commits from refactor-llvm_intrinsics into master 2024-07-09 16:30:32 +08:00
Collaborator

Use macros to reduce code duplication in codegen/llvm_intrinsic

Use macros to reduce code duplication in `codegen/llvm_intrinsic`
abdul124 added 1 commit 2024-07-08 12:21:48 +08:00
abdul124 requested review from sb10q 2024-07-08 15:18:29 +08:00
sb10q reviewed 2024-07-09 04:48:22 +08:00
@ -317,0 +175,4 @@
/// Use `into_int_value` for Integer return type and `into_float_value` for Float return type
/// * `$llvm_ty:ident`: Type of first operand
/// * `,($val:ident)*`: Comma separated list of operands
macro_rules! helper_generate_llvm_intrinsic_fn_call {
Owner

Remove "helper" and "call" terminology (also in comments, this is not generating a function call).

Remove "helper" and "call" terminology (also in comments, this is *not* generating a function call).
Author
Collaborator

Renamed macros to:

  1. generate_llvm_intrinsic_fn_body: Generates the llvm intrinsic build call (body of the call_llvm_intrinsic functions).
  2. generate_llvm_intrinsic_fn: Generates the function header and uses the macro generate_llvm_intrinsic_fn_body for function body.
Renamed macros to: 1) `generate_llvm_intrinsic_fn_body`: Generates the llvm intrinsic build call (body of the `call_llvm_intrinsic` functions). 2) `generate_llvm_intrinsic_fn`: Generates the function header and uses the macro `generate_llvm_intrinsic_fn_body` for function body.
abdul124 added 1 commit 2024-07-09 10:42:34 +08:00
sb10q merged commit 88b72af2d1 into master 2024-07-09 16:30:32 +08:00
sb10q deleted branch refactor-llvm_intrinsics 2024-07-09 16:30:33 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#450
No description provided.